File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 1010 options :
1111 - latest
1212 - nightly
13+ - beta
1314 default : nightly
1415
1516jobs :
17+ set-publish-version :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+ - name : Set up Node.js
23+ uses : actions/setup-node@v4
24+ - name : Set publish version
25+ id : set-publish-version
26+ if : github.event.inputs.tag == 'nightly'
27+ working-directory : packages/sdk
28+ run : |
29+ if [ "${{ github.event.inputs.tag }}" == "nightly" ]; then
30+ CURRENT_VERSION=$(npm pkg get version | tr -d '"')
31+ NIGHTLY_VERSION="${CURRENT_VERSION}-nightly-${GITHUB_SHA::7}"
32+ echo "VERSION=${NIGHTLY_VERSION}" >> $GITHUB_OUTPUT
33+ else
34+ echo "VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_OUTPUT
35+ fi
36+ outputs :
37+ VERSION : ${{ steps.set-publish-version.outputs.VERSION }}
38+
1639 publish-npm :
1740 uses : iExecBlockchainComputing/github-actions-workflows/.github/workflows/publish-npm.yml@feat/publish-npm
41+ needs : set-publish-version
1842 with :
1943 scope : ' @iexec/deserializer'
2044 registry : ' https://registry.npmjs.org'
2145 node-version : ' 18'
2246 tag : ${{ github.event.inputs.tag }}
2347 environment : production
2448 working-directory : " packages/dataprotector-deserializer"
49+ version : ${{ needs.set-publish-version.outputs.VERSION }}
2550 install-command : |
2651 npm ci
2752 cd ../sdk
3156 cd ../dataprotector-deserializer
3257 npm run test:prepare
3358 secrets :
34- npm-token : ${{ secrets.NPM_TOKEN }}
59+ npm-token : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments