-
Notifications
You must be signed in to change notification settings - Fork 33
48 lines (41 loc) · 1.21 KB
/
build.yml
File metadata and controls
48 lines (41 loc) · 1.21 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
name: Build
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: "checkout main"
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: "Capture commit hash"
run: |
cd ${GITHUB_WORKSPACE}
COMMIT=`git rev-parse HEAD`
echo "commit=${COMMIT}" >> $GITHUB_ENV
- name: "Setup Node"
uses: ./.github/actions/setup-node
- name: "Build client"
run: |
cd ${GITHUB_WORKSPACE}/client
yarn build
- name: "Maybe commit release changes"
run: |
cd ${GITHUB_WORKSPACE}
git add --all
git add -f client/dist
git status
git config --global user.email "office@castironcoding.com"
git config --global user.name "Build Action"
git diff --staged --quiet || git commit -m "[C] build Manifold client from ${{ env.commit }}"
git checkout -b release-candidate
- name: "Push release-candidate changes"
env:
GH_TOKEN: ${{ github.token }}
run: |
cd ${GITHUB_WORKSPACE}
git push --force origin release-candidate