Skip to content

Commit 04556c3

Browse files
committed
feat(npm-publish.yml): add GitHub Actions workflow for npm publishing on push to main branch
1 parent 24049b6 commit 04556c3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: npm-publish
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
npm-publish:
8+
name: npm-publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
- name: Publish if version has been updated
14+
uses: pascalgn/npm-publish-action@1.3.9
15+
with:
16+
tag_name: "v%s"
17+
tag_message: "v%s"
18+
create_tag: "true"
19+
commit_pattern: "^Release (\\S+)"
20+
publish_command: "yarn"
21+
publish_args: "--non-interactive"
22+
env:
23+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }

0 commit comments

Comments
 (0)