File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will publish a package to npm when a release is created.
2
+ # https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ # TODO: add tests or leave them out, add build steps...?
5
+
6
+ name : npm publish
7
+
8
+ on :
9
+ release :
10
+ types : [created]
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+ - uses : actions/setup-node@v3
18
+ with :
19
+ node-version : 16
20
+ - run : npm ci
21
+ # - run: npm test
22
+
23
+ publish-npm :
24
+ needs : build
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - uses : actions/checkout@v3
28
+ - uses : actions/setup-node@v3
29
+ with :
30
+ node-version : 16
31
+ registry-url : https://registry.npmjs.org/
32
+ - run : npm ci
33
+ # - run: npm run build
34
+ - run : npm publish
35
+ env :
36
+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
You can’t perform that action at this time.
0 commit comments