Skip to content

Commit fac9ef4

Browse files
authored
Merge pull request #33 from OneSignal/test_cd_npm_deploy
Updated NPM publish action to trigger on release tag added.
2 parents 25fbe76 + e14656d commit fac9ef4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/npm_deploy.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: NPM Publish
22

33
on:
4-
push:
5-
branches: [main]
6-
workflow_dispatch:
7-
4+
release:
5+
types: [created]
86
jobs:
97
publish:
108
runs-on: ubuntu-latest
@@ -14,7 +12,7 @@ jobs:
1412
with:
1513
node-version: 19
1614
- name: Publish package
17-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
15+
if: github.event_name == 'release' && github.event.action == 'created'
1816
uses: JS-DevTools/npm-publish@v1
1917
with:
20-
token: ${{ secrets.NPM }}
18+
token: ${{ secrets.NPM }}

0 commit comments

Comments
 (0)