Skip to content

Commit

Permalink
added wasm to release (#1747)
Browse files Browse the repository at this point in the history
* added wasm to release

* added compression to wasm
  • Loading branch information
shahnawaz-creator authored Feb 11, 2025
1 parent 1f77050 commit 9c11e43
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions .github/workflows/build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,43 @@ jobs:
sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev wget
- name: Build
run: docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.23 make wasm-build
run: |
docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.23 make wasm-build
gzip -9 zcn.wasm && mv zcn.wasm.gz zcn.wasm
tar -czvf zcn_wasm.tar.gz zcn.wasm
- name: Setup Build
id: setup_build
run: |
tag=$(echo ${GITHUB_REF#refs/tags/})
echo ${tag}
if [[ "${{github.event_name}}" = "workflow_dispatch" ]]; then
echo "> 0Chain: trigger from workflow_dispatch"
echo "::set-output name=RELEASE::false"
echo "::set-output name=TAG::none"
elif [[ ${tag} = v*\.*\.* ]] ; then
echo "> 0Chain: trigger from git event"
# upload output on release
echo "::set-output name=RELEASE::true"
echo "::set-output name=TAG::${tag}"
fi
- name: Upload zcn_wasm to release
if: steps.setup_build.outputs.RELEASE == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: zcn_wasm.tar.gz
tag: ${{ steps.setup_build.outputs.TAG }}
overwrite: true
file_glob: true

- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: zcn.wasm
path: zcn.wasm
name: zcn_wasm
path: |
zcn_wasm.tar.gz

0 comments on commit 9c11e43

Please sign in to comment.