Skip to content

Commit fa62336

Browse files
author
Andy McKay
authored
Merge pull request actions#56 from zachguo/patch-1
fix npm-publish.yml
2 parents 87b9b0c + 7f515b7 commit fa62336

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ci/npm-publish.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
name: Node.js Package
22

33
on:
4-
pull_request:
5-
branches:
6-
- master
7-
push:
8-
branches:
9-
- master
4+
release:
5+
types: [created]
106

117
jobs:
128
build:
@@ -28,6 +24,7 @@ jobs:
2824
with:
2925
node-version: 12
3026
registry-url: https://registry.npmjs.org/
27+
- run: npm ci
3128
- run: npm publish
3229
env:
3330
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -42,6 +39,7 @@ jobs:
4239
node-version: 12
4340
registry-url: https://npm.pkg.github.com/
4441
scope: '@your-github-username'
42+
- run: npm ci
4543
- run: npm publish
4644
env:
4745
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)