Skip to content

Commit 050f81a

Browse files
committed
add workflow
1 parent 600e573 commit 050f81a

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
name: release
22
on:
3-
release:
4-
types: [published]
3+
push:
4+
branches: [ main, alpha, beta ]
55
jobs:
66
publish-npm:
77
runs-on: ubuntu-18.04
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-node@v1
11-
with:
12-
node-version: '10.14'
13-
registry-url: https://registry.npmjs.org/
14-
- name: Cache Node.js modules
15-
uses: actions/cache@v2
16-
with:
17-
path: ~/.npm
18-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
19-
restore-keys: |
20-
${{ runner.os }}-node-
21-
- run: npm ci
22-
- run: npm publish
23-
env:
24-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: '10.14'
13+
registry-url: https://registry.npmjs.org/
14+
- name: Cache Node.js modules
15+
uses: actions/cache@v2
16+
with:
17+
path: ~/.npm
18+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-node-
21+
- run: npm ci
22+
- run: npx semantic-release
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)