From 99f3c234808848668b3d9e317faa26b2ae90ea11 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Fri, 8 Nov 2024 15:17:31 -0800 Subject: [PATCH] update the correct one --- .github/workflows/lint.yml | 56 +++++++++++++++++++++-------------- .github/workflows/release.yml | 1 + 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b84dd9b2b..06c4ad60b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,33 +5,43 @@ on: - main pull_request: +env: + GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPR_USER: ${{ secrets.GITHUB_ACTOR }} + jobs: - library: - name: Lint + static-analysis: + name: Static Analysis runs-on: ubuntu-latest steps: - - name: Checkout project sources - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Configure JDK - uses: actions/setup-java@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'adopt' java-version: '17' - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - - name: Run build with Gradle Wrapper - run: ./gradlew build - - name: Dry run version bump and tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.1 + - name: Gradle Run ktlint + run: ./gradlew ktlintCheck --continue + - uses: actions/upload-artifact@v3 + name: Upload ktlint report + if: ${{ failure() }} + with: + name: ktlint + path: '**/build/reports/ktlint/' + + - name: Gradle Android lint library + run: ./gradlew :library:lintDebug + - uses: actions/upload-artifact@v3 + name: Upload library lint report + if: ${{ failure() }} + with: + name: lint + path: 'app/build/reports/library/lint-results-**.html' + + - name: Gradle Android lint example + run: ./gradlew :example:lintDebug + - uses: actions/upload-artifact@v3 + name: Upload example lint report + if: ${{ failure() }} with: - release_branches: "main" - github_token: ${{ secrets.GITHUB_TOKEN }} - dry_run: true - custom_tag: 3.0.1 - - name: Log dry run output - run: | - echo "Simulated tag: ${{ steps.tag_version.outputs.new_tag }}" - echo "Simulated version: ${{ steps.tag_version.outputs.new_version }}" + name: lint + path: 'app/build/reports/example/lint-results-**.html' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a4545dc9..4ac56c305 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,7 @@ jobs: uses: mathieudutour/github-tag-action@v6.1 with: release_branches: "release" + custom_tag: 3.0.1 github_token: ${{ secrets.GITHUB_TOKEN }} - name: Create a GitHub release uses: ncipollo/release-action@v1