Skip to content

CI

CI #73

Workflow file for this run

name: CI
on:
workflow_dispatch:
inputs:
release:
description: "Publish a release"
required: false
default: true
type: boolean
env:
CI_CHUNK_SIZE: 65
jobs:
build_individual:
name: Build individual modules
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v5
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Prepare signing key
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
- name: Build extensions
env:
CI_CHUNK_NUM: 0
ALIAS: ${{ secrets.ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: |
chmod +x ./gradlew | true
./gradlew -p src assembleRelease
- name: Upload APKs
uses: actions/upload-artifact@v4
with:
name: "individual-apks"
path: "**/*.apk"
retention-days: 1
- name: Clean up CI files
run: rm signingkey.jks
publish_repo:
name: Publish repo
if: ${{ inputs.release == true }}
needs:
- build_individual
runs-on: ubuntu-latest
steps:
- name: Download APK artifacts
uses: actions/download-artifact@v4
with:
path: ~/apk-artifacts
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 17
distribution: temurin
- name: Checkout main branch
uses: actions/checkout@v5
with:
path: main
- name: Create repo artifacts
run: |
cd main
python ./.github/scripts/move-apks.py
INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/keiyoushi/extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')"
curl -sSL "$INSPECTOR_LINK" -o ./Inspector.jar
java -jar ./Inspector.jar "repo/apk" "output.json" "tmp"
python ./.github/scripts/create-repo.py
- name: Checkout repo branch
uses: actions/checkout@v4
with:
ref: repo
path: repo
- name: Deploy repo
run: |
cd repo
../main/.github/scripts/commit-repo.sh