File tree Expand file tree Collapse file tree 3 files changed +68
-3232
lines changed Expand file tree Collapse file tree 3 files changed +68
-3232
lines changed Original file line number Diff line number Diff line change 1- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2- # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
1+ name : publish npm
32
4- name : Release
53on :
6- push :
7- branches :
8- - main
9- - next
10- jobs :
114 release :
5+ types : [published]
6+
7+ jobs :
8+ publish-npm :
129 runs-on : ubuntu-latest
1310 steps :
14- - name : Get npm cache directory
15- id : npm-cache
16- run : |
17- echo "::set-output name=dir::$(npm config get cache)"
18- - uses : actions/cache@v3
19- with :
20- path : ${{ steps.npm-cache.outputs.dir }}
21- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22- restore-keys : |
23- ${{ runner.os }}-node-
2411 - uses : actions/checkout@v3
25- - name : Setup Node.js
26- uses : actions/setup-node@v3
12+ - uses : actions/setup-node@v3
2713 with :
28- node-version : ' lts/*'
29-
30- - name : Install dependencies
31- run : npm ci
32-
33- - name : Test
34- run : npm test
35-
36- - name : Release 🚀
14+ node-version : 16
15+ registry-url : https://registry.npmjs.org/
16+ - run : npm publish
3717 env :
38- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
39- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40- run : npx semantic-release
18+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
You can’t perform that action at this time.
0 commit comments