File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
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://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name : Publish Node.js Package
5
+
6
+ on :
7
+ release :
8
+ types : [created]
9
+ workflow_dispatch :
10
+ inputs :
11
+ release-type :
12
+ required : true
13
+
14
+ jobs :
15
+ build :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+ - uses : actions/setup-node@v3
20
+ with :
21
+ node-version : 16
22
+ - run : |
23
+ npm install
24
+ npm run dist
25
+ publish-gpr :
26
+ needs : build
27
+ runs-on : ubuntu-latest
28
+ permissions :
29
+ contents : read
30
+ packages : write
31
+ steps :
32
+ - uses : actions/checkout@v3
33
+ - uses : actions/setup-node@v3
34
+ with :
35
+ node-version : 16
36
+ registry-url : " https://registry.npmjs.org"
37
+ scope : " @layer5"
38
+ - run : npm publish --verbose
39
+ env :
40
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments