File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 88 push :
99 # branches: [ master, staging, qa ]
1010 tags :
11- - ' v*.*.*'
11+ - " v*.*.*"
1212 # pull_request:
1313 workflow_dispatch :
1414
@@ -28,12 +28,22 @@ jobs:
2828 id : wasm_build
2929 run : |
3030 docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.22.5 sh -c "git config --global --add safe.directory /gosdk; make wasm-build"
31- BUILD_TAG=zcn-$(git describe --tags --exact-match)-normal.wasm
32- BUILD_TAG="${BUILD_TAG:0:4}${BUILD_TAG:5}"
31+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
32+ # For manual dispatch, use describe without exact-match or fallback to commit hash
33+ if TAG=$(git describe --tags 2>/dev/null); then
34+ BUILD_TAG=zcn-${TAG}-normal.wasm
35+ else
36+ BUILD_TAG=zcn-$(git rev-parse --short HEAD)-normal.wasm
37+ fi
38+ else
39+ # For tag pushes, use exact-match
40+ BUILD_TAG=zcn-$(git describe --tags --exact-match)-normal.wasm
41+ fi
42+ # BUILD_TAG="${BUILD_TAG:0:4}${BUILD_TAG:5}"
3343 mv zcn.wasm $BUILD_TAG
3444 echo "BUILD_TAG=$BUILD_TAG" >>$GITHUB_OUTPUT
3545
36- - name : ' Upload Artifact'
46+ - name : " Upload Artifact"
3747 uses : actions/upload-artifact@v4
3848 with :
3949 name : ${{ steps.wasm_build.outputs.BUILD_TAG }}
4353 run : |
4454 sudo apt update -y
4555 sudo apt install awscli -y
46-
56+
4757 - name : Copy the wasm binary to aws s3.
4858 run : |
4959 export AWS_ACCESS_KEY_ID=${{ secrets.WEBAPP_STATIC_ACCESS_KEY }}
You can’t perform that action at this time.
0 commit comments