chore: fixed github release workflow #818
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: Continuous Integration | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'app/**' | |
- 'fastlane/**' | |
- 'gradle/**' | |
- 'build.gradle.kts' | |
- 'deploy_playstore_fast.sh' | |
- 'settings.gradle.kts' | |
- 'gradle.properties' | |
- 'gradlew' | |
- 'gradlew.bat' | |
- 'gradle-wrapper.properties' | |
- 'gradle-wrapper.jar' | |
- '.github/workflows/android_pr_build.yml' | |
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: prepare for build | |
shell: bash | |
run: ./prepare_for_build.sh | |
env: | |
SERVICEACCOUNTJSON: ${{ secrets.SERVICEACCOUNTJSON }} | |
KEYSTOREPASSWORD: ${{ secrets.KEYSTOREPASSWORD }} | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYPASSWORD: ${{ secrets.KEYPASSWORD }} | |
KEYALIAS: ${{ secrets.KEYALIAS }} | |
- name: release bundle | |
run: ./gradlew bundlePlayRelease | |
- 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: prepare for build | |
shell: bash | |
run: ./prepare_for_build.sh | |
env: | |
SERVICEACCOUNTJSON: ${{ secrets.SERVICEACCOUNTJSON }} | |
KEYSTOREPASSWORD: ${{ secrets.KEYSTOREPASSWORD }} | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYPASSWORD: ${{ secrets.KEYPASSWORD }} | |
KEYALIAS: ${{ secrets.KEYALIAS }} | |
- name: copy bundle | |
uses: actions/download-artifact@v4 | |
with: | |
name: bundle | |
path: app/build/outputs/ | |
- name: validate deploy | |
# Do not want this to run on tags | |
run: ci/run-if-not-release /deploy_playstore_fast.sh --dry-run | |
deploy-beta: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
needs: [validate-deploy] | |
permissions: | |
contents: read | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: prepare for build | |
shell: bash | |
run: ./prepare_for_build.sh | |
env: | |
SERVICEACCOUNTJSON: ${{ secrets.SERVICEACCOUNTJSON }} | |
KEYSTOREPASSWORD: ${{ secrets.KEYSTOREPASSWORD }} | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYPASSWORD: ${{ secrets.KEYPASSWORD }} | |
KEYALIAS: ${{ secrets.KEYALIAS }} | |
- name: copy bundle | |
uses: actions/download-artifact@v4 | |
with: | |
name: bundle | |
path: app/build/outputs/ | |
- name: deploy | |
# do not want this to run on tags | |
run: ci/run-if-not-release ./deploy_playstore_fast.sh | |
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 |