Skip to content

Commit

Permalink
[Github] 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 8533219 commit 18ee385
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 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 @@ -362,6 +357,30 @@ jobs:
name: ${{ env.TARGET_FINAL }}-${{ env.git_hash }}.${{ env.TARGET_EXT }}
path: output/ANDROID/bin/${{ env.TARGET_BIN }}.${{ env.TARGET_EXT }}

- name: Get Build tools version
shell: bash
run: |
BUILD_TOOLS_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOLS_VERSION=$BUILD_TOOLS_VERSION" >> $GITHUB_ENV
echo Last build tools version is: $BUILD_TOOLS_VERSION
- uses: r0adkll/[email protected]
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 }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }}

- 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 Expand Up @@ -541,8 +560,7 @@ jobs:
c-ares \
curl \
lua \
netcdf-cxx \
libgeotiff
netcdf-cxx
- name: Compile XCSoar
# We use "-O0" instead of the default "-Og" to work around a
Expand Down

0 comments on commit 18ee385

Please sign in to comment.