diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc39e395..3cdceead 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,13 +29,16 @@ jobs: distribution: temurin java-version: 18 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3-beta + with: + cache-read-only: ${{ github.ref != 'refs/heads/main' }} + gradle-home-cache-cleanup: true + add-job-summary: always + dependency-graph: generate-and-submit + - name: Run unit tests - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 - with: - arguments: --no-configuration-cache --stacktrace check -PslimTests - gradle-home-cache-cleanup: true - cache-read-only: ${{ github.ref != 'refs/heads/main' }} - dependency-graph: generate-and-submit + run: ./gradlew --no-configuration-cache --stacktrace check -PslimTests - name: (Fail-only) Upload test report if: failure() @@ -87,26 +90,24 @@ jobs: distribution: temurin java-version: 18 - - name: Decrypt secrets + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3-beta + with: + cache-read-only: ${{ github.ref != 'refs/heads/main' }} + gradle-home-cache-cleanup: true + add-job-summary: always + dependency-graph: generate-and-submit + + - name: Build release APK run: | ./scripts/setup-age.sh ./scripts/signing-setup.sh "$AGE_SECRET_KEY" + + ./gradlew --no-configuration-cache --stacktrace collectReleaseApks + + ./scripts/signing-cleanup.sh + ./scripts/deploy-snapshot.sh env: AGE_SECRET_KEY: ${{ secrets.AGE_SECRET_KEY }} - - - name: Build release app - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 - env: - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - with: - arguments: --no-configuration-cache --stacktrace collectReleaseApks - gradle-home-cache-cleanup: true - cache-read-only: ${{ github.ref != 'refs/heads/main' }} - - - name: Clean secrets - run: scripts/signing-cleanup.sh - - - name: Deploy snapshot - run: scripts/deploy-snapshot.sh - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} diff --git a/.github/workflows/code_quality_analysis.yml b/.github/workflows/code_quality_analysis.yml index 94510cf5..262816df 100644 --- a/.github/workflows/code_quality_analysis.yml +++ b/.github/workflows/code_quality_analysis.yml @@ -31,10 +31,9 @@ jobs: distribution: temurin java-version: 18 - - name: Setup Gradle caching - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3-beta with: - gradle-home-cache-cleanup: true cache-read-only: true - name: Initialize CodeQL @@ -60,18 +59,6 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Set up JDK - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 - with: - distribution: temurin - java-version: 18 - - - name: Setup Gradle caching - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 - with: - gradle-home-cache-cleanup: true - cache-read-only: true - - name: Setup python uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1cb3252..062dce99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,18 +27,18 @@ jobs: distribution: temurin java-version: 18 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3-beta + with: + cache-read-only: ${{ github.ref != 'refs/heads/main' }} + gradle-home-cache-cleanup: true + - name: Set up Git author shell: bash run: | git config user.name "GitHub Actions" git config user.email noreply@github.com - - name: Setup Gradle caching - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 - with: - gradle-home-cache-cleanup: true - cache-read-only: true - - name: Decrypt secrets run: | ./scripts/setup-age.sh diff --git a/.github/workflows/tramline-release.yml b/.github/workflows/tramline-release.yml index 1e0a62d0..b7d22fa7 100644 --- a/.github/workflows/tramline-release.yml +++ b/.github/workflows/tramline-release.yml @@ -25,16 +25,18 @@ jobs: distribution: temurin java-version: 18 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3-beta + with: + cache-read-only: true + gradle-home-cache-cleanup: true + - name: Build release app - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 + run: ./gradlew --no-configuration-cache --stacktrace collectReleaseBundle env: SENTRY_DSN: ${{ secrets.SENTRY_DSN }} ORG_GRADLE_PROJECT_VERSION_NAME: ${{ github.event.inputs.versionName }} ORG_GRADLE_PROJECT_VERSION_CODE: ${{ github.event.inputs.versionCode }} - with: - arguments: --no-configuration-cache --stacktrace collectReleaseBundle - gradle-home-cache-cleanup: true - cache-read-only: ${{ github.ref != 'refs/heads/main' }} - name: Upload app bundle uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0