Skip to content

ci: build signed apk #5

ci: build signed apk

ci: build signed apk #5

Workflow file for this run

name: Build APK
on:
push:
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- name: Get short commit SHA
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Grant execution permission to Gradle Wrapper
run: chmod +x gradlew
- name: Build APK (testkey)
run: ./gradlew build
- name: Upload Debug APK (testkey)
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-debug-testkey.apk
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload Release APK (testkey)
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-release-testkey.apk
path: app/build/outputs/apk/release/app-release.apk
- name: Export key
env:
KEY_BASE64: ${{ secret.KEY_BASE64 }}

Check failure on line 46 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build APK

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 46, Col: 23): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.KEY_BASE64 .github/workflows/build.yml (Line: 51, Col: 30): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.KEYSTORE_PASSWORD
run: echo $KEY_BASE64 | base64 --decode - > app/signature.jks
- name: Build APK
env:
KEYSTORE_PASSWORD: ${{ secret.KEYSTORE_PASSWORD }}
KEY_PASSWORD: ${{ secret.KEY_PASSWORD }}
KEY_ALIAS: ${{ secret.KEY_ALIAS }}
run: ./gradlew build
- name: Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-debug-signed.apk
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload Release APK
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-release-signed.apk
path: app/build/outputs/apk/debug/app-debug.apk