Proguard and fix parceler warnings #9
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: Nightly | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "master" | |
paths: | |
- "app/**" | |
- ".github/workflows/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache Gradle packages | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build APK | |
run: | | |
export versionCode=$(date '+%s') | |
export versionName=$(git rev-parse --short HEAD) | |
sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," app/build.gradle | |
sed -i "s,^\(\s*versionName\) *.*,\1 \"$versionName\"," app/build.gradle | |
./gradlew assembleRelease | |
- uses: r0adkll/sign-android-release@v1 | |
name: Sign app APK | |
id: sign_app | |
with: | |
releaseDirectory: app/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- uses: IsaacShelton/[email protected] | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
release: "Nightly" | |
tag: "nightly" | |
replace: true | |
prerelease: true | |
files: > | |
${{ steps.sign_app.outputs.signedReleaseFile }} | |
- name: Cleanup Gradle Cache | |
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | |
# Restoring these files from a GitHub Actions cache might cause problems for future builds. | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties |