Skip to content

Add automation build type #279

Add automation build type

Add automation build type #279

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check-code-style:
name: Check code style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Decrypt and validate decrypted data
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./.github/workflows/decrypt-and-validate-data.sh
- name: Run spotless
run: ./gradlew app:spotlessCheck
run-tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Decrypt and validate decrypted data
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./.github/workflows/decrypt-and-validate-data.sh
- name: Run tests
run: ./gradlew app:test
build-gplay-debug:
name: Build Google Play debug
needs: [ check-code-style, run-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Decrypt and validate decrypted data
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./.github/workflows/decrypt-and-validate-data.sh
- name: Build
run: |
./gradlew app:assembleGplayDebug
- name: Store APK file
uses: actions/upload-artifact@v3
with:
name: app-gplay-debug.apk
path: |
./app/build/outputs/apk/gplay/debug/app-gplay-debug.apk
build-gplay-release:
name: Build Google Play release
needs: [ check-code-style, run-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Decrypt and validate decrypted data
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./.github/workflows/decrypt-and-validate-data.sh
- name: Build
run: |
./gradlew app:assembleGplayRelease
- name: Store APK file
uses: actions/upload-artifact@v3
with:
name: app-gplay-release.apk
path: |
./app/build/outputs/apk/gplay/release/app-gplay-release.apk
build-fdroid-debug:
name: Build FDroid debug
needs: [ check-code-style, run-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Decrypt and validate decrypted data
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./.github/workflows/decrypt-and-validate-data.sh
- name: Build
run: |
./gradlew app:assembleFdroidDebug
- name: Store APK file
uses: actions/upload-artifact@v3
with:
name: app-fdroid-debug.apk
path: |
./app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
build-fdroid-release:
name: Build FDroid release
needs: [ check-code-style, run-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Decrypt and validate decrypted data
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./.github/workflows/decrypt-and-validate-data.sh
- name: Build
run: |
./gradlew app:assembleFdroidRelease
- name: Store APK file
uses: actions/upload-artifact@v3
with:
name: app-fdroid-release.apk
path: |
./app/build/outputs/apk/fdroid/release/app-fdroid-release.apk