File tree Expand file tree Collapse file tree 2 files changed +41
-11
lines changed
Expand file tree Collapse file tree 2 files changed +41
-11
lines changed Original file line number Diff line number Diff line change 1+ name : Node.js build and publish package on GitHub Registry
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+ - uses : actions/setup-node@v3
13+ with :
14+ node-version : 16
15+ - run : npm ci
16+ - run : npm test
17+
18+ publish-gpr :
19+ needs : build
20+ runs-on : ubuntu-latest
21+ permissions :
22+ contents : read
23+ packages : write
24+ steps :
25+ - uses : actions/checkout@v3
26+ - uses : actions/setup-node@v3
27+ with :
28+ node-version : 16
29+ registry-url : https://npm.pkg.github.com/
30+ - run : npm ci
31+ - run : npm publish
32+ env :
33+ NODE_AUTH_TOKEN : ${{secrets.NODE_AUTH_TOKEN}}
Original file line number Diff line number Diff line change 1- name : Node.js build and publish package on GitHub Registry
1+ name : Node.js build and publish package
22
33on :
44 release :
55 types : [created]
6-
76jobs :
87 build :
9- runs-on : ubuntu -latest
8+ runs-on : windows -latest
109 steps :
1110 - uses : actions/checkout@v3
1211 - uses : actions/setup-node@v3
1312 with :
1413 node-version : 16
15- - run : npm ci
14+ - run : npm i
1615 - run : npm test
1716
18- publish-gpr :
17+ publish-npm :
1918 needs : build
2019 runs-on : ubuntu-latest
21- permissions :
22- contents : read
23- packages : write
2420 steps :
2521 - uses : actions/checkout@v3
2622 - uses : actions/setup-node@v3
2723 with :
2824 node-version : 16
29- registry-url : https://npm.pkg.github.com/
30- - run : npm ci
25+ registry-url : https://registry.npmjs.org/
26+ - run : npm i
27+ - run : npm run build
3128 - run : npm publish
3229 env :
33- NODE_AUTH_TOKEN : ${{secrets.NODE_AUTH_TOKEN }}
30+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments