Skip to content

Commit 250c657

Browse files
author
Nir Galon
committed
ci: separate publish to a new github workflow
1 parent 5129f95 commit 250c657

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

.github/workflows/cd.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,3 @@ jobs:
4848
with:
4949
node-module: true
5050
release-branches: '["main"]'
51-
52-
publish-npm:
53-
needs: publish-release
54-
runs-on: ubuntu-latest
55-
steps:
56-
- uses: actions/checkout@v2
57-
- uses: actions/setup-node@v1
58-
with:
59-
node-version: 12
60-
registry-url: https://registry.npmjs.org/
61-
- run: npm ci
62-
- run: npm publish
63-
env:
64-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish NPM package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
- run: npm ci
16+
17+
- run: npm publish
18+
env:
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)