3.54 #130
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: Android CI | |
on: | |
push: | |
branches: [ "star" ] | |
pull_request: | |
branches: [ "star" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: set up JDK 20 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '20' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Set up environment variables | |
run: | | |
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV | |
echo "$ANDROID_HOME/tools/bin" >> $GITHUB_PATH | |
echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> $GITHUB_PATH | |
- name: Accept licenses | |
run: yes | sdkmanager --licenses | |
- name: Build with Gradle | |
run: ./gradlew assembleRelease | |
- name: Sign APK | |
if: success() | |
id: sign_app | |
uses: r0adkll/[email protected] | |
with: | |
releaseDirectory: ./app/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.SIGNINGKEYBASE64 }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEYSTOREPASSWORD }} | |
keyPassword: ${{ secrets.KEYPASSWORD }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Signed app bundle | |
path: ${{steps.sign_app.outputs.signedReleaseFile}} |