Add automation build type #281
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: 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 | |
print-matrix-data: | |
name: Print matrix data | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- command: assembleGplayDebug | |
filePath: ./app/build/outputs/apk/gplay/debug/app-gplay-debug.apk | |
steps: | |
- name: Print | |
run: | | |
echo "command=${{ matrix.command }}" | |
echo "filePath=${{ matrix.filePath }}" | |
build-apks: | |
name: Build apk files | |
needs: [ check-code-style, run-tests ] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
buildType: [ GplayDebug, GplayRelease ] | |
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:assemble${{ matrix.buildType }} | |
- 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-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 |