Build signed apk #25
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: Build signed apk | |
on: | |
[workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Create keystore file | |
run: echo "${{ secrets.keystore }}" | base64 -d > $GITHUB_WORKSPACE/signing-key.jks | |
- name: Build with Gradle | |
run: ./gradlew assembleRelease | |
-Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/signing-key.jks | |
-Pandroid.injected.signing.store.password=${{ secrets.keystore_password }} | |
-Pandroid.injected.signing.key.alias=${{ secrets.key_alias }} | |
-Pandroid.injected.signing.key.password=${{ secrets.key_password }} | |
- name: Rename APK | |
run: mv app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/StreetComplete-release-$(git log -n 1 --format='%h').apk | |
- name: Archive APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-apk | |
path: app/build/outputs/apk/release/*.apk | |
retention-days: 14 |