Skip to content

Commit 2ded975

Browse files
committed
chore(CI): add semantic-release test
1 parent e1cdc85 commit 2ded975

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: semantic release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Setup Node
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: '12.x'
18+
- name: Cache dependencies
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.yarn
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
- run: yarn install --frozen-lockfile
26+
- name: Check tests before release
27+
run: yarn test
28+
29+
- name: Semantic Release
30+
uses: cycjimmy/semantic-release-action@v2
31+
with:
32+
dry_run: true
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
["@semantic-release/npm", {
6+
"npmPublish": false,
7+
"tarballDir": "dist",
8+
}],
9+
["@semantic-release/github", {
10+
"assets": "dist/*.tgz"
11+
}]
12+
]
13+
}

0 commit comments

Comments
 (0)