File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,11 @@ jobs:
2222 solana-cli-version : ' 1.18.15'
2323 node-version : ' 21.0.0'
2424
25- - name : Setup Node.js for NPM Publish
25+ - name : Setup Node.js
2626 uses : actions/setup-node@v4
2727 with :
28- node-version : ' 21.0.0'
29- registry-url : ' https://registry.npmjs.org'
30- auth-token : ${{ secrets.NPM_TOKEN }}
28+ node-version : " 21"
29+ registry-url : " https://registry.npmjs.org"
3130
3231 - name : Build
3332 run : anchor build
@@ -38,18 +37,19 @@ jobs:
3837 - name : Determine NPM Tag
3938 id : determine-npm-tag
4039 run : |
41- VERSION_TAG=${{ github.ref_name } }
40+ VERSION_TAG=${GITHUB_REF#refs/tags/v }
4241 if [[ $VERSION_TAG == *"-"* ]]; then
43- NPM_TAG= ${VERSION_TAG#*-}
42+ echo ::set-output name=NPM_TAG:: ${VERSION_TAG#*-}
4443 else
45- NPM_TAG= latest
44+ echo ::set-output name=NPM_TAG:: latest
4645 fi
47- echo "NPM_TAG=$NPM_TAG" >> "$GITHUB_OUTPUT"
46+ env :
47+ GITHUB_REF : ${{ github.ref }}
4848
4949 - name : Publish to NPM
5050 run : |
51- yarn publish \
52- --access public \
53- --new-version "${{ github.ref_name }}" \
54- --tag " ${{ steps.determine-npm-tag.outputs.NPM_TAG }}" \
55- --no-git-tag-version
51+ yarn publish --access public --new-version ${GITHUB_REF#refs/tags/v} --tag ${{
52+ steps.determine-npm-tag.outputs.NPM_TAG }} --no-git-tag-version
53+ env :
54+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
55+ GITHUB_REF : ${{ github.ref }}
You can’t perform that action at this time.
0 commit comments