Run test on push tag with release prefix #32
Workflow file for this run
This file contains hidden or 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: Build | |
run-name: Run test on push tag with release prefix | |
on: | |
push: | |
tags: | |
- 'release*' | |
pull_request: | |
branches: [ master ] | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
RELEASE_SIGN_KEY_ALIAS: ${{ secrets.RELEASE_SIGN_KEY_ALIAS }} | |
RELEASE_SIGN_KEY_PASSWORD: ${{ secrets.RELEASE_SIGN_KEY_PASSWORD }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Checkout keystore repo | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ secrets.KEYSTORE_GIT_REPOSITORY }} | |
token: ${{ secrets.KEYSTORE_ACCESS_TOKEN }} | |
path: app/keystore | |
- uses: gradle/gradle-build-action@v3 | |
with: | |
cache-disabled: true | |
cache-read-only: false | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
validate-wrappers: true | |
gradle-home-cache-cleanup: true | |
- name: Check build-logic | |
run: ./gradlew check -p build-logic | |
- name: Test application | |
run: ./gradlew testDevDebug | |
- name: Build release APK and AAB | |
run: | | |
./gradlew assembleProdRelease | |
./gradlew bundleProdRelease | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: App apk | |
path: app/build/outputs/apk/prod/release/*.apk | |
- name: Upload AAB Bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
name: App bundle | |
path: app/build/outputs/bundle/prodRelease/*.aab | |
- name: Check lint | |
run: ./gradlew :app:lintProdRelease :lint:lint | |
- name: Upload lint html reports | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lint-reports | |
path: '**/build/reports/lint-results-*.html' |