Skip to content

Update dominguez_debug.yml #11

Update dominguez_debug.yml

Update dominguez_debug.yml #11

Workflow file for this run

name: Test App
on:
push:
branches:
- dominguez
tags:
- '*alpha*'
- '*beta*'
- '*rc*'
# jobs are run in parallel on different machines
# all steps run in series
jobs:
test:
name: Test App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup build tool version variable
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 Last build tool version is: $BUILD_TOOL_VERSION
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin' #Eclipse
java-version: '17'
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Run Linters and Test
run: ./gradlew check
- name: Build with Gradle
run: ./gradlew build
- name: Build Release APK
run: ./gradlew assembleRelease --stacktrace
#path app/build/outputs/apk/release/app-release-unsigned.apk
- name: Rename Release APK
#skip app-release-unsigned-signed.apk case
run: mv app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/app-release.apk
- name: Sign APK Release
id: sign_apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEY_STORE_FILE }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
alias: ${{ secrets.KEY_ALIAS }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- name: Upload Reports if not tag
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/') == false
with:
name: test-reports
path: app/build/reports
- name: Upload APK if not tag
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/') == false
with:
path: app/build/outputs/apk/release/app-release.apk
- name: Zip Test Results
uses: montudor/action-zip@v1
if: startsWith(github.ref, 'refs/tags/')
with:
args: zip -qq -r test-reports.zip app/build/reports
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: Release dominguez ${{ github.ref_name }}
files: |
${{steps.sign_apk.outputs.signedReleaseFile}}
test-reports.zip