Skip to content

Commit

Permalink
Update github action to sign apk
Browse files Browse the repository at this point in the history
  • Loading branch information
zinuzoid committed May 30, 2024
1 parent 6581044 commit c6a1677
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,19 +280,14 @@ jobs:
runs-on: ubuntu-22.04

env:
DEBUG: n
TARGET: ANDROIDFAT
TARGET_BIN: XCSoar-debug
TARGET_FINAL: XCSoar-debug
TARGET_BIN: XCSoar-release
TARGET_FINAL: XCSoar-release
TARGET_EXT: apk
NDK: r26d

steps:
- name: set vars for push
if: github.event_name == 'push'
run: |
echo "DEBUG=n" >> $GITHUB_ENV
echo "TARGET_FINAL=XCSoar" >> $GITHUB_ENV
- id: checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -356,12 +351,27 @@ jobs:
USE_CCACHE=y \
V=2
- uses: r0adkll/sign-android-release@v1
name: Sign app APK
id: sign_app
with:
releaseDirectory: output/ANDROID/bin
signingKeyBase64: ${{ secrets.XCSOAR_JET_UPLOAD_KEY_JKS_BASE64 }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.XCSOAR_JET_UPLOAD_KEY_JKS_PASSWORD }}

- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.TARGET_FINAL }}-${{ env.git_hash }}.${{ env.TARGET_EXT }}
path: output/ANDROID/bin/${{ env.TARGET_BIN }}.${{ env.TARGET_EXT }}

- name: upload artifact - signed
uses: actions/upload-artifact@v4
with:
name: ${{ env.TARGET_FINAL }}-${{ env.git_hash }}-signed.${{ env.TARGET_EXT }}
path: ${{steps.sign_app.outputs.signedReleaseFile}}

- name: Deploy to Staging server
if: |
github.repository == 'XCSoar/XCSoar' &&
Expand Down

0 comments on commit c6a1677

Please sign in to comment.