File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 11name : Publish to Registry 📦
22on :
3- workflow_dispatch :
4- inputs :
5- version :
6- description : ' The updated registry version number.'
7- required : true
3+ push :
4+ tags :
5+ - ' v*'
86
97jobs :
108 build :
3230 - run : yarn install --frozen-lockfile
3331 - run : yarn build
3432 - run : git stash
35- - run : npm version ${{ github.event.inputs.version }} -m "Release ${{ github.event.inputs.version }} 📣"
33+ - name : Set version to match the tag
34+ run : |
35+ VERSION=${GITHUB_REF#refs/tags/v}
36+ npm version $VERSION -m "Release $VERSION 📣"
37+ env :
38+ GITHUB_REF : ${{ github.ref }}
3639 - run : git push
3740
3841 # Publish to npm
@@ -48,11 +51,10 @@ jobs:
4851 scope : ' @jamesives'
4952
5053 - name : Authenticate with the GitHub Package Registry
51- run :
52- echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" >
53- ~/.npmrc
54+ run : |
55+ echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
5456
5557 # Publish to GitHub Packages
5658 - run : npm publish
5759 env :
58- NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments