Skip to content

Commit 17b0def

Browse files
committed
Modifications to release action
1 parent ec6fe54 commit 17b0def

File tree

1 file changed

+17
-25
lines changed

1 file changed

+17
-25
lines changed

.github/workflows/npm-publish.yml

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
11
name: Node.js Package
22

33
on:
4-
release:
5-
types: [created]
4+
release:
5+
types: [created]
66

77
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-npm:
19-
needs: build
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/setup-node@v3
24-
with:
25-
node-version: 16
26-
registry-url: https://registry.npmjs.org/
27-
- run: npm ci
28-
- run: npm publish
29-
env:
30-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
8+
publish-npm:
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+
cache: "npm"
16+
registry-url: https://registry.npmjs.org/
17+
- run: npm -g install webpack webpack-cli
18+
- run: npm -g install rollup
19+
- run: npm install
20+
- run: npm publish
21+
env:
22+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)