-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (40 loc) · 1.32 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
name: J2ObjC Build
on: [push]
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
target:
- Debug
- Release
env:
RUN_TARGET: ${{ matrix.target }}
AZ_TOKEN: ${{ secrets.AZ_TOKEN }}
J2OBJC: 2.8
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Download J2Objc
run: |
wget -q https://github.com/google/j2objc/releases/download/$J2OBJC/j2objc-$J2OBJC.zip
unzip -q j2objc-$J2OBJC.zip
echo "j2objc.home=./j2objc-$J2OBJC/" > local.properties
- name: Build with Gradle
run: ./gradlew -b j2objc.gradle clean :j2objcAssemble${RUN_TARGET} -x test
- name: Push Binary
if: github.ref == 'refs/heads/master'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Akihiro Urushihara"
cd ./build/j2objcOutputs/
git init
git checkout -b ${RUN_TARGET}
git add --all
git commit -m "by GitHub Action CI (SHA ${GITHUB_SHA})"
git remote add origin https://${AZ_TOKEN}@dev.azure.com/SocialHub/ObjCBinary/_git/ObjCBinary
git push -f origin ${RUN_TARGET}