Skip to content

Commit 88d0a77

Browse files
authored
Merge pull request #2 from queueit/release-workflow
Updated npm-publish workflow to be ran only when a release is done.
2 parents c7087f5 + cf9f826 commit 88d0a77

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: npm-publish
22
on:
3-
push:
4-
branches:
5-
- master # Change this to your default branch
3+
release:
4+
types: [released]
5+
66
jobs:
77
npm-publish:
88
name: npm-publish
@@ -18,12 +18,8 @@ jobs:
1818
run: cd example; yarn
1919
- name: Install packages
2020
run: yarn
21-
- name: Publish if version has been updated
22-
uses: pascalgn/npm-publish-action@4f4bf159e299f65d21cd1cbd96fc5d53228036df
23-
with: # All of theses inputs are optional
24-
tag_name: "v%s"
25-
tag_message: "v%s"
26-
commit_pattern: "^Release (\\S+)"
21+
- name: Publish release to npm
22+
run: npm publish
2723
env:
2824
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
29-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
25+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings

0 commit comments

Comments
 (0)