-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (58 loc) · 2.12 KB
/
linux.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
name: Linux
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Apt Update
run: sudo apt update
- name: Apt Install
run: sudo apt-get install ninja-build --yes --quiet
- name: Get Depot Tools
run: git clone https://github.com/Kode/depot_tools.git
- name: Add Depot Tools to the path
run: echo "./depot_tools" >> $GITHUB_PATH
- name: Bootstrap gclient configuration
run: cp standalone.gclient .gclient
- name: Sync gclient
run: gclient sync
- name: Compile
run: mkdir -p out/Release && cd out/Release && cmake -DCMAKE_BUILD_TYPE=Release -GNinja ../.. && ninja
- name: Get KincTools_linux_x64
run: git clone https://github.com/Kode/KincTools_linux_x64.git
- name: Copy binary
run: cp out/Release/tint KincTools_linux_x64/tint
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "robbot2019@robdangero.us"
- name: Commit binary
id: commit
continue-on-error: true
run: git -C KincTools_linux_x64 commit -a -m "Update tint binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KincTools_linux_x64 tag tint_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KincTools_linux_x64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KincTools_linux_x64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KincTools_linux_x64 pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KincTools_linux_x64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KincTools_linux_x64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}