Skip to content

ci: build release APK, add short SHA to artifact file name #3

ci: build release APK, add short SHA to artifact file name

ci: build release APK, add short SHA to artifact file name #3

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 Debug APK
run: ./gradlew assembleDebug
- name: Upload Debug APK
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: Build Release APK
run: ./gradlew assembleRelease
- name: Upload Release APK
uses: actions/upload-artifact@v4
with:
name: OwnDroid-CI-${{ env.SHORT_SHA }}-release-testkey.apk
path: app/build/outputs/apk/debug/app-debug.apk