chore: fixed github release workflow #815
Workflow file for this run
This file contains 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: PR Checks | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'app/**' | |
- 'gradle/**' | |
- 'build.gradle.kts' | |
- 'settings.gradle.kts' | |
- 'gradle.properties' | |
- 'gradlew' | |
- 'gradlew.bat' | |
- 'gradle-wrapper.properties' | |
- 'gradle-wrapper.jar' | |
- '.github/workflows/android_pr_build.yml' | |
- 'fastlane/**' | |
pull_request: | |
paths: | |
- 'app/**' | |
- 'gradle/**' | |
- 'build.gradle.kts' | |
- 'settings.gradle.kts' | |
- 'gradle.properties' | |
- 'gradlew' | |
- 'gradlew.bat' | |
- 'gradle-wrapper.properties' | |
- 'gradle-wrapper.jar' | |
- '.github/workflows/android_pr_build.yml' | |
jobs: | |
compile_and_lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
permissions: | |
contents: read | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gradle setup | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
# needed for configuration task cache | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: compile | |
run: ./gradlew compileFdroidDebugKotlin | |
- name: lint | |
run: ./gradlew lintFdroidDebug | |
compile_android_test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
permissions: | |
contents: read | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gradle setup | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: compile android test | |
run: ./gradlew compileFdroidDebugAndroidTestKotlin | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
permissions: | |
contents: read | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gradle setup | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: test | |
run: ./gradlew testFdroidDebug | |
release_apk: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
permissions: | |
contents: read | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gradle setup | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: release apk | |
run: ./gradlew assembleFdroidRelease | |
play_bundle: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
permissions: | |
contents: read | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gradle setup | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: release bundle | |
run: ./gradlew bundlePlayRelease | |
# Save bundle to artifacts for later use | |
- name: save bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundle | |
retention-days: 1 | |
path: | | |
app/build/outputs/bundle/playRelease/app-play-release.aab | |
app/build/outputs/mapping/playRelease/mapping.txt | |
validate_deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
if: github.event_name == 'pull_request' | |
needs: [play_bundle] | |
permissions: | |
contents: read | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gradle setup | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: copy bundle | |
uses: actions/download-artifact@v4 | |
with: | |
name: bundle | |
- name: validate deploy | |
run: ./deploy_playstore_fast.sh --dry-run | |
ktlint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
permissions: | |
contents: read | |
steps: | |
- name: perform the checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gradle setup | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: ktlint check | |
run: ./gradlew ktlintCheck |