File tree Expand file tree Collapse file tree 1 file changed +36
-5
lines changed
Expand file tree Collapse file tree 1 file changed +36
-5
lines changed Original file line number Diff line number Diff line change 11name : Build And Release
22
3- on : [workflow_dispatch, push]
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - ' v*'
8+ branches :
9+ - main
410
511jobs :
612 Build :
@@ -75,18 +81,43 @@ jobs:
7581 with :
7682 submodules : true
7783
84+ - name : Update npm
85+ run : npm install -g npm@latest
86+
87+ - name : Install pnpm
88+ uses : pnpm/action-setup@v4
89+
7890 - name : Download Artifacts
79- uses : actions/download-artifact@v3
91+ uses : actions/download-artifact@v5
8092
8193 - name : Fix Directory Structure
8294 run : |
8395 mkdir bin
96+ ls -la
8497 mv bin-*/* bin/
8598 rm -rf bin-*
8699 sudo chmod -R +x bin
87100
101+ - name : Verify Binaries
102+ run : |
103+ // make sure all binaries are present
104+ if [ ! -f bin/dump-syms-linux-x64 ]; then echo "Missing bin/dump-syms-linux-x64" && exit 1; fi
105+ if [ ! -f bin/dump-syms-linux-arm64 ]; then echo "Missing bin/dump-syms-linux-arm64" && exit 1; fi
106+ if [ ! -f bin/dump-syms-macos-x64 ]; then echo "Missing bin/dump-syms-macos-x64" && exit 1; fi
107+ if [ ! -f bin/dump-syms-macos-arm64 ]; then echo "Missing bin/dump-syms-macos-arm64" && exit 1; fi
108+ if [ ! -f bin/dump-syms-windows-x64.exe ]; then echo "Missing bin/dump-syms-windows-x64.exe" && exit 1; fi
109+ if [ ! -f bin/dump-syms-windows-arm64.exe ]; then echo "Missing bin/dump-syms-windows-arm64.exe" && exit 1; fi
110+
111+ - name : Verify Version
112+ run : |
113+ TAG_VERSION=${GITHUB_REF#refs/tags/v}
114+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
115+ if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
116+ echo "Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)"
117+ exit 1
118+ fi
119+
88120 # this will only publish if the version has been updated
89121 - name : NPM Publish
90- uses :
JS-DevTools/[email protected] 91- with :
92- token : ${{secrets.NPM_TOKEN}}
122+ run : |
123+ npm publish
You can’t perform that action at this time.
0 commit comments