Skip to content

IITC.utils API

IITC.utils API #596

Workflow file for this run

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@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- uses: actions/setup-python@v5
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@v4
with:
name: build
include-hidden-files: true
path: |
./build/.metadata/
./build/build/