Skip to content

Commit

Permalink
chore: rename action
Browse files Browse the repository at this point in the history
  • Loading branch information
alvr committed Jan 31, 2024
1 parent 26118f1 commit e083c9b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
14 changes: 13 additions & 1 deletion .github/actions/common-steps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Common Steps

description: Common steps for Katana workflows

inputs:
gradle-encryption-key:
description: 'Encryption key for Gradle cache'
required: true

runs:
using: composite
steps:
Expand All @@ -11,6 +16,13 @@ runs:
distribution: zulu
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v3.0.0
uses: gradle/actions/setup-gradle@v3.0.0
with:
add-job-summary-as-pr-comment: on-failure
artifact-retention-days: 7
build-scan-publish: true
build-scan-terms-of-service-url: https://gradle.com/terms-of-service
build-scan-terms-of-service-agree: yes
cache-encryption-key: ${{ inputs.gradle-encryption-key }}
dependency-graph: generate-and-submit
gradle-home-cache-cleanup: true
18 changes: 14 additions & 4 deletions .github/workflows/katana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ jobs:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Assemble Katana
run: ./gradlew assembleDebug --no-daemon --scan --stacktrace
run: ./gradlew assembleDebug --no-daemon --stacktrace
- name: Upload compose reports artifact
uses: actions/[email protected]
if: always()
Expand Down Expand Up @@ -94,6 +96,8 @@ jobs:
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
Expand All @@ -120,8 +124,10 @@ jobs:
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 --scan --stacktrace
run: ./gradlew :koverXmlReport :koverVerify --no-daemon --stacktrace
- name: Upload tests reports artifact
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -150,6 +156,8 @@ jobs:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Decode keystore
uses: timheuer/[email protected]
with:
Expand All @@ -170,7 +178,7 @@ jobs:
SENTRY_PROJECT: ${{ secrets.SENTRY_ANDROID_BETA_PROJECT }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: ./gradlew assembleBeta -Pkatana.flavor=beta --no-daemon --scan --stacktrace
run: ./gradlew assembleBeta -Pkatana.flavor=beta --no-daemon --stacktrace
- name: Publish beta APK to TestApp.io
uses: testappio/github-action@v5
with:
Expand Down Expand Up @@ -212,6 +220,8 @@ jobs:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Decode keystore
uses: timheuer/[email protected]
with:
Expand All @@ -227,7 +237,7 @@ jobs:
SENTRY_PROJECT: ${{ secrets.SENTRY_ANDROID_RELEASE_PROJECT }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: ./gradlew assembleRelease bundleRelease -Pkatana.flavor=release --no-daemon --scan --stacktrace
run: ./gradlew assembleRelease bundleRelease -Pkatana.flavor=release --no-daemon --stacktrace
- name: Publish production AAB to Google Play
uses: r0adkll/[email protected]
with:
Expand Down
14 changes: 14 additions & 0 deletions init.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import org.gradle.github.GitHubDependencyGraphPlugin

initscript {
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("org.gradle:github-dependency-graph-gradle-plugin:1.2.0")
}
}

apply<GitHubDependencyGraphPlugin>()

0 comments on commit e083c9b

Please sign in to comment.