-
Notifications
You must be signed in to change notification settings - Fork 109
54 lines (45 loc) · 1.54 KB
/
build_pr.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 PR
# read-only repo token
# no access to secrets
on:
pull_request:
paths-ignore:
- '!.github/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Set env BUILD_TYPE
run: |
echo "BUILD_TYPE=test" >> "$GITHUB_ENV"
- name: Download localbuildsettings.py
run: wget https://iitc.app/deploy/localbuildsettings.py
- name: Run build.py
env:
PR_NUMBER: ${{ github.event.number }}
run: ./build.py $BUILD_TYPE
- name: Save PR metadata
run: |
mv ./build/${{ env.BUILD_TYPE }} ./build/build
mkdir -p ./build/.metadata
echo "PR" > ./build/.metadata/build_type
echo ${{ github.event.number }} > ./build/.metadata/pr_number
echo ${{ github.event.pull_request.head.sha }} > ./build/.metadata/commit
echo $( ls ./build/build/ | grep '.apk' ) > ./build/.metadata/apk_filename
echo $( ls ./build/build/ | grep '.zip' ) > ./build/.metadata/zip_filename
echo $(date -u +'%Y-%m-%d_%H-%M' -d"$(stat -c %y ./build/build/total-conversion-build.user.js)") > ./build/.metadata/buildstamp
- uses: actions/upload-artifact@v2
with:
name: build
path: |
./build/.metadata/
./build/build/