File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ name: build
33on : [push, pull_request]
44
55jobs :
6- build :
7- uses : userscripters/shared-actions/.github/workflows/workflow-nodejs.yml@master
6+ build :
7+ uses : userscripters/shared-actions/.github/workflows/workflow-nodejs.yml@master
Original file line number Diff line number Diff line change 11name : Publish a package
22
33on :
4- release :
5- types : [published]
4+ release :
5+ types : [released]
6+ workflow_dispatch :
67
78jobs :
8- build :
9- runs-on : ubuntu-latest
10-
11- steps :
12- - uses : actions/checkout@v3
13- - name : Using Node 16
14- uses : actions/setup-node@v3
15- with :
16- node-version : 16
17- - name : Update npm version to latest
18- run : npm install -g npm@latest
19- - name : Install dependencies
20- run : |
21- npm config set //npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN
22- npm install
23- env :
24- NODE_AUTH_TOKEN : ${{github.token}}
25- - name : Compile
26- run : npm run build
27- - name : Run tests
28- run : npm run test
29-
30- publish-gh :
31- needs : build
32- runs-on : ubuntu-latest
33- steps :
34- - uses : actions/checkout@v3
35- - uses : actions/setup-node@v3
36- with :
37- node-version : 16
38- registry-url : " https://registry.npmjs.org"
39- scope : " @${{github.repository_owner}}"
40- - run : npm install
41- - run : |
42- npm config set @${{github.repository_owner}}:registry https://npm.pkg.github.com
43- npm config set //npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN
44- npm publish --access public
45- env:
46- NODE_AUTH_TOKEN: ${{secrets.PAT}}
47-
48- publish-npm :
49- needs : build
50- runs-on : ubuntu-latest
51- steps :
52- - uses : actions/checkout@v3
53- - uses : actions/setup-node@v3
54- with :
55- node-version : 16
56- registry-url : " https://registry.npmjs.org"
57- scope : " @${{github.repository_owner}}"
58- - run : npm install
59- env :
60- NODE_AUTH_TOKEN : ${{github.token}}
61- - run : |
62- npm config set @${{github.repository_owner}}:registry https://registry.npmjs.org
63- npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
64- npm publish --access public
65- env:
66- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
9+ build :
10+ uses : userscripters/shared-actions/.github/workflows/workflow-npm_publish.yml@master
Original file line number Diff line number Diff line change 11name : " release"
22
33on :
4- push :
5- tags :
6- - " *"
4+ push :
5+ tags :
6+ - " *"
7+ workflow_dispatch :
78
89jobs :
9- release :
10- runs-on : " ubuntu-latest"
10+ release :
11+ runs-on : " ubuntu-latest"
1112
12- steps :
13- - uses : actions/checkout@v3
14- - uses : " marvinpinto/action-automatic-releases@latest"
15- with :
16- repo_token : " ${{ secrets.PAT }}"
17- prerelease : false
13+ steps :
14+ - uses : actions/checkout@v3
15+ - uses : " marvinpinto/action-automatic-releases@latest"
16+ with :
17+ repo_token : " ${{ secrets.PAT }}"
18+ prerelease : false
You can’t perform that action at this time.
0 commit comments