File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 1- name : Create Release
1+ name : Create Release and Publish to NPM
22
33on :
44 push :
2222 make_latest : true
2323 env :
2424 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25+
26+ npm-publish :
27+ needs : github-release
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Checkout
31+ uses : actions/checkout@v4
32+
33+ - name : Setup Node.js
34+ uses : actions/setup-node@v4
35+ with :
36+ node-version : ' 18'
37+ registry-url : ' https://registry.npmjs.org'
38+
39+ - name : Install dependencies
40+ run : npm ci
41+
42+ - name : Build package
43+ run : npm run build
44+
45+ - name : Update package version
46+ run : |
47+ TAG_VERSION=${GITHUB_REF#refs/tags/v}
48+ npm version $TAG_VERSION --no-git-tag-version
49+
50+ - name : Publish to NPM
51+ run : npm publish --access public
52+ env :
53+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments