Skip to content

Commit 126b0b5

Browse files
authored
separate build/test and publish actions
1 parent 0035e21 commit 126b0b5

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.github/workflows/node.js.yml renamed to .github/workflows/build_test.yml

+1-19
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,4 @@ jobs:
2727
cache: 'npm'
2828
- run: npm ci
2929
- run: npm run build --if-present
30-
- run: npm test
31-
32-
publish-npm:
33-
needs: build
34-
on:
35-
release:
36-
types: [created]
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v3
40-
- uses: actions/setup-node@v3
41-
with:
42-
node-version: 16
43-
registry-url: https://registry.npmjs.org/
44-
- run: npm ci
45-
- run: npm publish
46-
env:
47-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
48-
30+
- run: npm test

.github/workflows/publish_npm.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish to NPM
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish-npm:
7+
needs: build
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: 16
14+
registry-url: https://registry.npmjs.org/
15+
- run: npm ci
16+
- run: npm publish
17+
env:
18+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
19+

0 commit comments

Comments
 (0)