Adapt after rebasing #28
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
# This workflow will build the APK using JDK when a commit is pushed or a pull request is opened | |
name: build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Prepare for signing | |
run: | | |
echo "${{secrets.RELEASE_KEYSTORE}}" > infinity.jks.asc | |
gpg -d --passphrase "${{secrets.RELEASE_KEYSTORE_PASSPHRASE}}" --batch infinity.jks.asc > ${{github.workspace}}/infinity.jks | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: > | |
assembleMinifiedRelease | |
-Pandroid.injected.signing.store.file=${{github.workspace}}/infinity.jks | |
-Pandroid.injected.signing.store.password=${{secrets.RELEASE_KEYSTORE_PW}} | |
-Pandroid.injected.signing.key.alias=adanski-infinity | |
-Pandroid.injected.signing.key.password=${{secrets.RELEASE_KEYSTORE_PW}} | |
- name: Rename APK and generate checksum | |
run: | | |
cd app/build/outputs/apk/minifiedRelease | |
find -name "*.apk" -exec mv '{}' infinity-personal-${{github.ref_name}}.apk \; -quit | |
sha256sum infinity-personal-${{github.ref_name}}.apk > infinity-personal-${{github.ref_name}}.apk.sha256 | |
cd ${{github.workspace}} | |
- name: Upload APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: infinity-personal-${{github.ref_name}} | |
path: | | |
app/build/outputs/apk/minifiedRelease/*.apk | |
app/build/outputs/apk/minifiedRelease/*.apk.sha256 | |
if-no-files-found: error | |
retention-days: 7 |