Skip to content

android(0.5.10): fix apk signing key in github actions #57

android(0.5.10): fix apk signing key in github actions

android(0.5.10): fix apk signing key in github actions #57

Workflow file for this run

name: Build APK
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 24
cache: yarn
- name: install and prebuild
run: |
yarn install
yarn bundle:es
yarn expo prebuild -p android --clean --no-install
- name: build apk
run: ./gradlew assembleRelease
working-directory: android
# https://github.com/r0adkll/sign-android-release/issues/84#issuecomment-1889636075
- name: set build tool version
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo build tool version: $BUILD_TOOL_VERSION
echo "VERSION_CODE=$(jq -r '.versionCode' package.json)" >> $GITHUB_ENV
- uses: r0adkll/sign-android-release@v1
name: sign apk
id: sign_apk
with:
releaseDirectory: android/app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- name: rename apk
run: |
sudo apt-get update && sudo apt-get install -y rename
rename 's/release-unsigned-signed/release/' *.apk
working-directory: android/app/build/outputs/apk/release
- uses: softprops/action-gh-release@v2
name: upload apk
with:
body_path: metadata/en-US/changelogs/${{ env.VERSION_CODE }}04.txt
files: android/app/build/outputs/apk/release/*-release.apk