From dff0dcd899877700d15dad2707dcf0a775ac741a Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 23 Nov 2024 08:30:00 -0800 Subject: [PATCH] Update to new gradle action --- .github/workflows/build.yml | 24 ++++++++++-------------- .github/workflows/release.yml | 6 +++--- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 212b6f9..c2be8d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,29 +55,25 @@ jobs: distribution: temurin java-version: 17 + - uses: gradle/actions/setup-gradle@v4 + - name: build - uses: gradle/gradle-build-action@v2 - with: - arguments: | - build - -PtestJavaVersion=${{ matrix.test-java-version }} - -Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }} + run: > + ./gradlew + build + -PtestJavaVersion=${{ matrix.test-java-version }} + -Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }} env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - name: generate # Skip running on macos-latest which doesn't have docker if: matrix.os == 'ubuntu-latest' - uses: gradle/gradle-build-action@v2 - with: - arguments: | - generateSemanticConventions --console=plain + run: ./gradlew generateSemanticConventions --console=plain + # Run spotless after generate to format generated code - name: spotless - uses: gradle/gradle-build-action@v2 - with: - arguments: | - spotlessApply + run: ./gradlew spotlessApply - name: Check for diff run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3963361..2988083 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,10 @@ jobs: distribution: temurin java-version: 17 + - uses: gradle/actions/setup-gradle@v4 + - name: Build and publish artifacts - uses: gradle/gradle-build-action@v2 - with: - arguments: assemble publishToSonatype closeAndReleaseSonatypeStagingRepository + run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository env: SONATYPE_USER: ${{ secrets.SONATYPE_USER }} SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}