-
Notifications
You must be signed in to change notification settings - Fork 14
62 lines (57 loc) · 1.91 KB
/
macos.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
name: macOS
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.10'
architecture: 'x64'
- name: Configure
run: ./configure --openssl-no-asm --without-intl --dest-cpu=x86_64
- name: Compile
run: make -j3
- name: Get KincTools_macos
run: git clone https://github.com/Kode/KincTools_macos.git
- name: Copy binary
run: cp out/Release/node KincTools_macos/kmake
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "[email protected]"
- name: Add binary
run: git -C KincTools_macos add .
- name: Commit binary
id: commit
continue-on-error: true
run: git -C KincTools_macos commit -a -m "Update macOS binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KincTools_macos tag macos_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KincTools_macos push https://Kode-Robbot:[email protected]/Kode/KincTools_macos.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KincTools_macos pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KincTools_macos push https://Kode-Robbot:[email protected]/Kode/KincTools_macos.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}