Skip to content

Commit 770789e

Browse files
authored
use github action to publish
1 parent 2f11284 commit 770789e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: npm-publish
2+
on:
3+
push:
4+
branches:
5+
- master # Change this to your default branch
6+
jobs:
7+
npm-publish:
8+
name: npm-publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@master
13+
- name: Set up Node.js
14+
uses: actions/setup-node@master
15+
with:
16+
node-version: 10.0.0
17+
- name: Publish if version has been updated
18+
uses: pascalgn/npm-publish-action@4f4bf159e299f65d21cd1cbd96fc5d53228036df
19+
with: # All of theses inputs are optional
20+
tag_name: "v%s"
21+
tag_message: "v%s"
22+
commit_pattern: "^Release (\\S+)"
23+
env: # More info about the environment variables in the README
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
25+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings

0 commit comments

Comments
 (0)