Skip to content

Commit

Permalink
ci(app): enable app signing
Browse files Browse the repository at this point in the history
  • Loading branch information
mikonse committed Jan 2, 2024
1 parent 4fd07ad commit 5349fa8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,30 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Write gradle.properties to include signing key configuration for android release build
# if: ${{ !failure() && !cancelled() && startsWith(github.ref, 'refs/heads/master')}}
env:
TEST: foobar
KEYSTORE: ${{ secrets.ANDROID_KEYSTORE_B64 }}
KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEY_STORE_ALIAS }}
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
run: |
echo "${KEYSTORE}" | base64 --decode > abrechnung-app-upload.keystore
ls -lah .
mkdir -p ~/.gradle
echo "ABRECHNUNG_UPLOAD_STORE_FILE=$(pwd)/abrechnung-app-upload.keystore" >> ~/.gradle/gradle.properties
echo "ABRECHNUNG_UPLOAD_KEY_ALIAS=${KEYSTORE_ALIAS}" >> ~/.gradle/gradle.properties
echo "ABRECHNUNG_UPLOAD_STORE_PASSWORD=${KEYSTORE_PASSWORD}" >> ~/.gradle/gradle.properties
echo "ABRECHNUNG_UPLOAD_KEY_PASSWORD=${KEY_PASSWORD}" >> ~/.gradle/gradle.properties
echo "TEST=${TEST}" >> ~/.gradle/gradle.properties
cat ~/.gradle/gradle.properties
- name: Build App APK
run: npx nx build-android mobile --tasks assembleRelease

# - name: Sign App APK
# id: sign_app_apk
# uses: r0adkll/sign-android-release@v1
# with:
# releaseDirectory: frontend/apps/mobile/android/app/build/outputs/apk/release
# signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
# alias: ${{ secrets.ANDROID_KEY_STORE_ALIAS }}
# keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}

# - name: Upload APK
# uses: actions/upload-artifact@v3
# with:
# name: app-release-apk
# path: ${{steps.sign_app_apk.outputs.signedReleaseFile}}
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-release-apk
path: frontend/apps/mobile/android/app/build/outputs/apk/release/app-release.apk
2 changes: 1 addition & 1 deletion .github/workflows/push_on_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
with:
files: |
debs/*.deb
frontend/apps/mobile/android/app/build/outputs/apk/debug/app-debug.apk
frontend/apps/mobile/android/app/build/outputs/apk/release/app-release.apk
# if it's not already published, keep the release as a draft.
draft: true
# mark it as a prerelease if the tag contains 'rc'.
Expand Down

0 comments on commit 5349fa8

Please sign in to comment.