feat: better monthly grouping #29
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: Gradle | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
build-develop: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: build-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
ACRA_EMAIL: ${{ secrets.ACRA_EMAIL }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Spotless | |
run: ./gradlew spotlessCheck | |
- name: Extract service-user.json | |
run: 'echo "$SERVICE_USER" | base64 --decode > domain/src/jvmTest/resources/service-user.json' | |
shell: bash | |
env: | |
SERVICE_USER: ${{secrets.SERVICE_USER}} | |
- name: Extract google-services.json | |
run: 'echo "$GOOGLE_SERVICES" | base64 --decode > app-android/google-services.json' | |
shell: bash | |
env: | |
GOOGLE_SERVICES: ${{secrets.GOOGLE_SERVICES}} | |
- name: Unit tests | |
run: ./gradlew test | |
- name: Generate koverXmlReport | |
run: ./gradlew koverXmlReport | |
- name: Generate koverHtmlReport | |
run: ./gradlew koverHtmlReport | |
- name: Upload codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./build/reports/kover/report.xml | |
- name: Upload reports | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Reports | |
path: ${{ github.workspace }}/**/build/reports/**/* | |
retention-days: 5 | |
- name: Add coverage to PR | |
uses: madrapps/[email protected] | |
with: | |
path: ${{ github.workspace }}/build/reports/kover/report.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 40 | |
- name: Extract upload store | |
run: 'echo "$UPLOAD_STORE_BASE64" | base64 --decode > app-android/upload-keystore.jks' | |
shell: bash | |
env: | |
UPLOAD_STORE_BASE64: ${{secrets.UPLOAD_STORE_BASE64}} | |
- name: Bundle | |
if: github.ref == 'refs/heads/develop' | |
run: ./gradlew :app-android:bundleRelease | |
env: | |
UPLOAD_KEYSTORE_PASSWORD: ${{secrets.UPLOAD_KEYSTORE_PASSWORD}} | |
UPLOAD_KEYSTORE_KEY_ALIAS: ${{secrets.UPLOAD_KEYSTORE_KEY_ALIAS}} | |
UPLOAD_KEYSTORE_KEY_PASSWORD: ${{secrets.UPLOAD_KEYSTORE_KEY_PASSWORD}} | |
- name: Publish to google play | |
if: github.ref == 'refs/heads/develop' | |
uses: r0adkll/[email protected] | |
continue-on-error: true | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON_PLAIN_TEXT }} | |
packageName: simple.payment.tracker | |
releaseFiles: app-android/build/outputs/bundle/release/app-android-release.aab | |
track: internal | |
inAppUpdatePriority: 2 | |
status: draft |