Skip to content

Commit ea51411

Browse files
GH: improve release action
1 parent c097e45 commit ea51411

File tree

1 file changed

+22
-25
lines changed

1 file changed

+22
-25
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,6 @@ jobs:
6161
# Verify account was funded
6262
stellar keys address deployer
6363
64-
- name: Upload WASM files to testnet
65-
run: |
66-
# Upload smart account contract
67-
SMART_ACCOUNT_HASH=$(stellar contract install \
68-
--wasm target/wasm32v1-none/release/smart_account.wasm \
69-
--source deployer \
70-
--network testnet)
71-
echo "SMART_ACCOUNT_HASH=$SMART_ACCOUNT_HASH" >> $GITHUB_ENV
72-
73-
# Upload contract factory
74-
FACTORY_HASH=$(stellar contract install \
75-
--wasm target/wasm32v1-none/release/contract_factory.wasm \
76-
--source deployer \
77-
--network testnet)
78-
echo "FACTORY_HASH=$FACTORY_HASH" >> $GITHUB_ENV
79-
80-
echo "Smart Account WASM Hash: $SMART_ACCOUNT_HASH"
81-
echo "Factory WASM Hash: $FACTORY_HASH"
82-
8364
- name: Generate TypeScript bindings
8465
run: |
8566
# Generate bindings for smart account
@@ -149,6 +130,25 @@ jobs:
149130
--wasm-out "$OUT_DIR/${base}.optimized.wasm"
150131
done
151132
133+
- name: Upload WASM files to testnet
134+
run: |
135+
# Upload smart account contract (optimized)
136+
SMART_ACCOUNT_HASH=$(stellar contract upload \
137+
--wasm target/wasm32v1-none/release/optimized/smart_account.optimized.wasm \
138+
--source deployer \
139+
--network testnet)
140+
echo "SMART_ACCOUNT_HASH=$SMART_ACCOUNT_HASH" >> $GITHUB_ENV
141+
142+
# Upload contract factory (optimized)
143+
FACTORY_HASH=$(stellar contract upload \
144+
--wasm target/wasm32v1-none/release/optimized/contract_factory.optimized.wasm \
145+
--source deployer \
146+
--network testnet)
147+
echo "FACTORY_HASH=$FACTORY_HASH" >> $GITHUB_ENV
148+
149+
echo "Smart Account WASM Hash: $SMART_ACCOUNT_HASH"
150+
echo "Factory WASM Hash: $FACTORY_HASH"
151+
152152
- name: Calculate WASM hashes and create release tarfile
153153
run: |
154154
# Create release directory
@@ -187,14 +187,11 @@ jobs:
187187
tar -tzf stellar-smart-account-release-${{ github.event.release.tag_name }}.tar.gz
188188
189189
- name: Upload release artifact
190-
uses: actions/upload-release-asset@v1
191190
env:
192191
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
193-
with:
194-
upload_url: ${{ github.event.release.upload_url }}
195-
asset_path: ./stellar-smart-account-release-${{ github.event.release.tag_name }}.tar.gz
196-
asset_name: stellar-smart-account-release-${{ github.event.release.tag_name }}.tar.gz
197-
asset_content_type: application/gzip
192+
run: |
193+
gh release upload ${{ github.event.release.tag_name }} \
194+
stellar-smart-account-release-${{ github.event.release.tag_name }}.tar.gz
198195
199196
- name: Create deployment summary
200197
run: |

0 commit comments

Comments
 (0)