Skip to content

Commit 69457e6

Browse files
committed
build: setup release workflow
1 parent a803182 commit 69457e6

File tree

2 files changed

+63
-3
lines changed

2 files changed

+63
-3
lines changed

.github/workflows/release.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- beta
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/setup-node@v2-beta
16+
with:
17+
node-version: 12
18+
19+
- name: Install dependencies
20+
run: yarn --frozen-lockfile
21+
22+
- name: Build all
23+
run: yarn build
24+
25+
- name: Upload built artifacts
26+
uses: actions/upload-artifact@v2
27+
with:
28+
name: build
29+
path: dist
30+
retention-days: 1 # mostly just for passing to publish, so retention is not needed
31+
32+
publish:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
with:
38+
persist-credentials: false
39+
40+
- name: Download the build
41+
uses: actions/download-artifact@v2
42+
with:
43+
name: build
44+
path: dist
45+
46+
- name: Install dependencies
47+
run: yarn --frozen-lockfile
48+
49+
- name: Semantic release
50+
run: yarn release
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@ jobs:
1919
fail-fast: false
2020
steps:
2121
- uses: actions/checkout@v2
22+
2223
- name: Setup node
2324
uses: actions/setup-node@v2-beta
2425
with:
2526
node-version: ${{ matrix.node }}
26-
- run: yarn
27-
- run: yarn lint
28-
- run: yarn test
27+
28+
- name: Install dependencies
29+
run: yarn --frozen-lockfile
30+
31+
- name: Lint
32+
run: yarn lint
33+
34+
- name: Test
35+
run: yarn test

0 commit comments

Comments
 (0)