1.0.8 #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
push: | |
branches: [ "beta" ] | |
paths-ignore: | |
- ".github/**" | |
- "!.github/workflows/**" | |
- ".idea/" | |
- "fastlane/" | |
- '.gitignore' | |
- "*.md" | |
- "LICENSE" | |
pull_request: | |
branches: [ "beta" ] | |
paths-ignore: | |
- ".github/**" | |
- "!.github/workflows/**" | |
- ".idea/" | |
- "fastlane/" | |
- '.gitignore' | |
- "*.md" | |
- "LICENSE" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build App | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Create signing files | |
if: github.event_name == 'push' | |
run: | | |
echo releaseType=CI > package.properties | |
mkdir -p ~/.gradle | |
echo "${{ secrets.KEYSTORE_SECRET }}" | base64 -d > ~/key.jks | |
echo "AKANE_RELEASE_STORE_FILE=$(realpath ~/key.jks)" > ~/.gradle/gradle.properties | |
echo "AKANE_RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PWD }}" >> ~/.gradle/gradle.properties | |
echo "AKANE_RELEASE_KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> ~/.gradle/gradle.properties | |
echo "AKANE_RELEASE_KEY_PASSWORD=${{ secrets.KEY_PWD }}" >> ~/.gradle/gradle.properties | |
- name: Build with Gradle | |
run: ./gradlew :app:assembleRelease | |
- name: Find apk | |
run: | | |
APK_FILE=$(find app/build/outputs/apk/release -name '*.apk') | |
echo "APK_FILE=$APK_FILE" >> $GITHUB_ENV | |
echo "APK_FILE_NAME=$(basename $APK_FILE .apk)" >> $GITHUB_ENV | |
- name: Upload apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.APK_FILE_NAME }} | |
path: ${{ env.APK_FILE }} | |
compression-level: 9 |