-
-
Notifications
You must be signed in to change notification settings - Fork 212
77 lines (64 loc) · 1.79 KB
/
release.yml
File metadata and controls
77 lines (64 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release
on:
push:
branches:
- master
- next
- beta
- alpha
- '*.x' # maintenance releases
jobs:
release-library:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache packages
uses: actions/cache@v3
with:
key: node_modules-v4-${{ hashFiles('yarn.lock') }}
path: |-
node_modules
*/node_modules
restore-keys: 'node_modules-v4-'
- name: Yarn install
run: yarn install --ignore-optional --frozen-lockfile
- name: Build library
run: yarn run build
- name: Deploy library
run: yarn run semantic-release || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
release-storybook:
needs:
- release-library
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache packages
uses: actions/cache@v3
with:
key: node_modules-v4-${{ hashFiles('yarn.lock') }}
path: |-
node_modules
*/node_modules
restore-keys: 'node_modules-v4-'
- name: Yarn install
run: yarn install --ignore-optional --frozen-lockfile
- name: Build Storybook
run: yarn run build:storybook
- name: Deploy Storybook
run: ./node_modules/.bin/firebase deploy --token=$FIREBASE_TOKEN
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}