Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.5.3 #4697

fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.5.3

fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.5.3 #4697

Workflow file for this run

name: Katana
on:
pull_request:
push:
branches:
- develop
tags:
- v*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TZ: UTC
permissions:
contents: write
pull-requests: write
jobs:
cancel-stale-jobs:
name: Cancel stale jobs
runs-on: ubuntu-latest
steps:
- name: Cancel Stale Jobs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
assemble:
name: Assembling
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Assemble Katana
run: ./gradlew :app:assembleDebug --no-daemon --stacktrace
- name: Upload debug artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: Katana v${{ github.run_number }}
path: |
${{ vars.ANDROID_DEBUG_APK }}
retention-days: 7
- name: Upload compose reports artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
with:
name: compose-reports
path: |
**/build/compose-metrics
**/build/compose-reports
retention-days: 7
static-analysis:
name: Static analysis
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Run detekt
run: ./gradlew detektAll lintDebug --no-daemon --stacktrace
- name: Upload static reports artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: static-report
path: |
build/reports/detekt/detekt.xml
**/build/reports/lint-results-debug.xml
retention-days: 1
- name: Analyze detekt report
uses: github/codeql-action/upload-sarif@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
with:
sarif_file: build/reports/detekt/detekt.sarif
checkout_path: ${{ github.workspace }}
unit-tests:
name: Unit testing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Run unit tests
run: ./gradlew :koverXmlReport :koverVerify --no-daemon --stacktrace
- name: Upload tests reports artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: tests-reports
path: |
**/build/reports/tests/jvmTest
**/build/reports/tests/testDebugUnitTest
retention-days: 7
- name: Upload report to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/reports/kover/report.xml
flags: unittests
verbose: true
deploy-beta:
name: Beta deployment
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
needs: [ static-analysis, unit-tests ]
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Decode keystore
uses: timheuer/base64-to-file@784a1a4a994315802b7d8e2084e116e783d157be # v1.2.4
with:
fileDir: .
fileName: ${{ secrets.SIGNING_FILE }}
encodedString: ${{ secrets.SIGNING_FILE_BASE64 }}
- name: Bump versionCode
uses: chkfung/android-version-actions@fcf89abef1c7afba2083146dcca0c6da4705ba4b # v1.2.3
with:
gradlePath: build-logic/katana-convention/src/main/kotlin/dev/alvr/katana/buildlogic/extensions.kt
versionCode: ${{ github.run_number }}
- name: Build staging APK
env:
SIGNING_ALIAS: ${{ secrets.SIGNING_ALIAS }}
SIGNING_ALIAS_PASS: ${{ secrets.SIGNING_ALIAS_PASS }}
SIGNING_FILE: ${{ secrets.SIGNING_FILE }}
SIGNING_FILE_PASS: ${{ secrets.SIGNING_FILE_PASS }}
run: ./gradlew :app:assembleBeta -Pkatana.flavor=beta --no-daemon --stacktrace
deploy-production:
name: Production deployment
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [ static-analysis, unit-tests ]
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Decode keystore
uses: timheuer/base64-to-file@784a1a4a994315802b7d8e2084e116e783d157be # v1.2.4
with:
fileDir: .
fileName: ${{ secrets.SIGNING_FILE }}
encodedString: ${{ secrets.SIGNING_FILE_BASE64 }}
- name: Build production AAB
env:
SIGNING_ALIAS: ${{ secrets.SIGNING_ALIAS }}
SIGNING_ALIAS_PASS: ${{ secrets.SIGNING_ALIAS_PASS }}
SIGNING_FILE: ${{ secrets.SIGNING_FILE }}
SIGNING_FILE_PASS: ${{ secrets.SIGNING_FILE_PASS }}
run: ./gradlew :app:assembleRelease :app:bundleRelease -Pkatana.flavor=release --no-daemon --stacktrace
- name: Publish production AAB to Google Play
uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
packageName: dev.alvr.katana
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: internal
status: completed
mappingFile: app/build/outputs/mapping/release/mapping.txt
- name: Create Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
name: Katana ${{ github.ref_name }}
files: |
${{ vars.ANDROID_RELEASE_APK }}
draft: true
prerelease: false