This repository was archived by the owner on Jan 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +37
-20
lines changed
Expand file tree Collapse file tree 1 file changed +37
-20
lines changed Original file line number Diff line number Diff line change 11name : npm-publish
22
33on :
4- push :
5- branches :
6- - master
4+ release :
5+ types : [created]
76
87jobs :
9- npm-publish :
10- name : npm-publish
8+ build :
119 runs-on : ubuntu-latest
1210 steps :
13- - name : Checkout repository
14- uses : actions/checkout@master
15- - name : Set up Node.js
16- uses : actions/setup-node@master
17- with :
18- node-version : 10.0.0
19- - name : Publish if version has been updated
20- uses : pascalgn/npm-publish-action@4f4bf159e299f65d21cd1cbd96fc5d53228036df
21- with : # All of theses inputs are optional
22- tag_name : " %s"
23- tag_message : " %s"
24- commit_pattern : " ^Release (\\ S+)"
25- env :
26- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
27- NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
11+ - uses : actions/checkout@v2
12+ - uses : actions/setup-node@v1
13+ with :
14+ node-version : 10.0.0
15+ - run : npm ci
16+ - run : npm test
17+
18+ publish-npm :
19+ needs : build
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v2
23+ - uses : actions/setup-node@v1
24+ with :
25+ node-version : 10
26+ registry-url : https://registry.npmjs.org/
27+ - run : npm ci
28+ - run : npm publish
29+ env :
30+ NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
31+
32+ publish-gpr :
33+ needs : build
34+ runs-on : ubuntu-latest
35+ steps :
36+ - uses : actions/checkout@v2
37+ - uses : actions/setup-node@v1
38+ with :
39+ node-version : 10
40+ registry-url : https://npm.pkg.github.com/
41+ - run : npm ci
42+ - run : npm publish
43+ env :
44+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments