Skip to content

Commit a205806

Browse files
committed
build: add release workflow
1 parent ffbe8be commit a205806

File tree

3 files changed

+6129
-88
lines changed

3 files changed

+6129
-88
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- beta
7+
- main
8+
tags:
9+
- "!*"
10+
11+
jobs:
12+
release:
13+
if: "! contains(github.event.head_commit.message, '[skip ci]') && ! contains(github.event.head_commit.message, '[ci skip]')"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- uses: actions/cache@v2
19+
with:
20+
path: ~/.npm
21+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-
24+
25+
- name: Build
26+
run: |
27+
npm ci
28+
npm run build
29+
30+
- name: Release
31+
run: npm run release
32+
env:
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)