You've already forked KsuWebUIStandalone
mirror of
https://github.com/5ec1cff/KsuWebUIStandalone.git
synced 2025-09-06 06:37:11 +00:00
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ master ]
|
|
tags: [ v* ]
|
|
pull_request:
|
|
merge_group:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: "recursive"
|
|
fetch-depth: 0
|
|
|
|
- name: Write key
|
|
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/master' ) || github.ref_type == 'tag' }}
|
|
run: |
|
|
if [ ! -z "${{ secrets.KEY_STORE }}" ]; then
|
|
echo storePassword='${{ secrets.KEY_STORE_PASSWORD }}' >> keystore.properties
|
|
echo keyAlias='${{ secrets.ALIAS }}' >> keystore.properties
|
|
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> keystore.properties
|
|
echo storeFile=$PWD/'key.jks' >> keystore.properties
|
|
echo '${{ secrets.KEY_STORE }}' | base64 --decode > key.jks
|
|
fi
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
with:
|
|
gradle-home-cache-cleanup: true
|
|
|
|
- name: Build with Gradle
|
|
run: |
|
|
chmod +x ./gradlew
|
|
./gradlew assemble
|
|
|
|
- name: Upload release
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "KsuWebUI-release"
|
|
path: "./app/build/outputs/apk/release/*.apk"
|
|
|
|
- name: Upload release mapping
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "KsuWebUI-release-mappings"
|
|
path: "./app/build/outputs/mapping/release"
|
|
|
|
- name: Upload debug
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "KsuWebUI-debug"
|
|
path: "./app/build/outputs/apk/debug/*.apk"
|