You've already forked KsuWebUIStandalone
mirror of
https://github.com/5ec1cff/KsuWebUIStandalone.git
synced 2025-09-06 06:37:11 +00:00
actions: build
This commit is contained in:
65
.github/workflows/build.yml
vendored
Normal file
65
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user