-
Notifications
You must be signed in to change notification settings - Fork 139
72 lines (61 loc) · 1.49 KB
/
release.yml
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
name: Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Repository
uses: actions/checkout@v2
with:
ref: master
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache Node Modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-
- name: Yarn Install
run: |
yarn
- name: Build
run: |
yarn build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
commit-bundle:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check diff
uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/*.(ts|js|json)
- name: Set up Repository
uses: actions/checkout@v2
with:
ref: bundle
- name: Download Bundle
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Commit and Push
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add dist
git commit -m "chore: updated bundle"
git push origin HEAD --force
if: env.GIT_DIFF