Skip to content

Commit

Permalink
actions: build
Browse files Browse the repository at this point in the history
  • Loading branch information
5ec1cff committed Oct 4, 2024
1 parent c9fa217 commit 1b262b0
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 1b262b0

Please sign in to comment.