mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Build beta only
|
|
|
|
on: [workflow_dispatch]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: gradle
|
|
|
|
- name: Access test login credentials
|
|
run: |
|
|
echo "TEST_USER_NAME=${{ secrets.TEST_USER_NAME }}" >> local.properties
|
|
echo "TEST_USER_PASSWORD=${{ secrets.TEST_USER_PASSWORD }}" >> local.properties
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Set env
|
|
run: echo "COMMIT_SHA=$(git log -n 1 --format='%h')" >> $GITHUB_ENV
|
|
|
|
- name: Generate betaDebug APK
|
|
run: ./gradlew assembleBetaDebug --stacktrace
|
|
|
|
- name: Rename betaDebug APK
|
|
run: mv app/build/outputs/apk/beta/debug/app-*.apk app/build/outputs/apk/beta/debug/apps-android-commons-betaDebug-$COMMIT_SHA.apk
|
|
|
|
- name: Upload betaDebug APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: apps-android-commons-betaDebugAPK-${{ env.COMMIT_SHA }}
|
|
path: app/build/outputs/apk/beta/debug/*.apk
|
|
retention-days: 30
|