-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.13 KB
/
build.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
name: Build
on:
push:
branches:
- main
env:
PNPM_VERSION: '6.15.0'
NODE_VERSION: '15.1.0'
jobs:
build:
runs-on: ubuntu-latest
name: tsc
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm cache clean --force
- name: Intall pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: ${{ env.PNPM_VERSION }}
run_install: |
- recursive: false
args: [--shamefully-hoist]
- name: Init and build
run: |
pnpm install
pnpm run build
- name: Setting git
run: |
git config --local user.email ${{ secrets.GIT_MAIL }}
git config --local user.name ${{ secrets.GIT_NAME }}
- name: Commit build result
run: |
git add -N .
if ! git diff --exit-code --quiet
then
git add .
git commit -m "ci: build "
git pull
git push origin ${GITHUB_REF#refs/heads/}
fi