Skip to content

Commit c097e45

Browse files
CI: Fix release action (#104)
1 parent 0449db1 commit c097e45

File tree

1 file changed

+46
-22
lines changed

1 file changed

+46
-22
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
4444
- name: Install Stellar CLI
4545
run: |
46-
curl -L https://github.com/stellar/stellar-cli/releases/download/v23.0.0/stellar-cli-23.0.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz
46+
curl -L https://github.com/stellar/stellar-cli/releases/download/v25.2.0/stellar-cli-25.2.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz
4747
sudo mv stellar /usr/local/bin/
4848
stellar --version
4949
@@ -83,34 +83,58 @@ jobs:
8383
- name: Generate TypeScript bindings
8484
run: |
8585
# Generate bindings for smart account
86-
cd packages/smart_account
8786
stellar contract bindings typescript \
88-
--wasm ../../target/wasm32v1-none/release/smart_account.wasm \
89-
--output-dir temp \
87+
--wasm target/wasm32v1-none/release/smart_account.wasm \
88+
--output-dir bindings \
9089
--overwrite
91-
cp temp/src/index.ts src/index.ts
92-
rm -rf temp
93-
90+
# Overwrite generated tsconfig to prevent bs58 ambient type resolution error in TS 5.x
91+
cat > bindings/tsconfig.json << 'EOF'
92+
{
93+
"compilerOptions": {
94+
"target": "ESNext",
95+
"module": "NodeNext",
96+
"moduleResolution": "nodenext",
97+
"declaration": true,
98+
"outDir": "./dist",
99+
"strictNullChecks": true,
100+
"skipLibCheck": true,
101+
"types": []
102+
},
103+
"include": ["src/*"]
104+
}
105+
EOF
106+
94107
# Generate bindings for factory
95-
cd ../factory
96108
stellar contract bindings typescript \
97-
--wasm ../../target/wasm32v1-none/release/contract_factory.wasm \
98-
--output-dir temp \
109+
--wasm target/wasm32v1-none/release/contract_factory.wasm \
110+
--output-dir bindings-factory \
99111
--overwrite
100-
cp temp/src/index.ts src/index.ts
101-
rm -rf temp
102-
cd ../..
112+
cat > bindings-factory/tsconfig.json << 'EOF'
113+
{
114+
"compilerOptions": {
115+
"target": "ESNext",
116+
"module": "NodeNext",
117+
"moduleResolution": "nodenext",
118+
"declaration": true,
119+
"outDir": "./dist",
120+
"strictNullChecks": true,
121+
"skipLibCheck": true,
122+
"types": []
123+
},
124+
"include": ["src/*"]
125+
}
126+
EOF
103127
104128
- name: Build TypeScript packages
105129
run: |
106-
cd packages/smart_account
130+
cd bindings
107131
pnpm install
108132
pnpm run build
109-
110-
cd ../factory
133+
134+
cd ../bindings-factory
111135
pnpm install
112136
pnpm run build
113-
cd ../..
137+
cd ..
114138
115139
- name: Optimize WASM contracts
116140
run: |
@@ -148,12 +172,12 @@ jobs:
148172
cd ..
149173
150174
# Copy TypeScript packages
151-
cp -r packages/smart_account/dist release-artifacts/smart_account_types
152-
cp -r packages/factory/dist release-artifacts/factory_types
153-
175+
cp -r bindings/dist release-artifacts/smart_account_types
176+
cp -r bindings-factory/dist release-artifacts/factory_types
177+
154178
# Copy package.json files for reference
155-
cp packages/smart_account/package.json release-artifacts/smart_account_types/
156-
cp packages/factory/package.json release-artifacts/factory_types/
179+
cp bindings/package.json release-artifacts/smart_account_types/
180+
cp bindings-factory/package.json release-artifacts/factory_types/
157181
158182
# Create tarfile including both optimized and unoptimized artifacts
159183
tar -czf stellar-smart-account-release-${{ github.event.release.tag_name }}.tar.gz -C release-artifacts .

0 commit comments

Comments
 (0)