Skip to content

Commit

Permalink
Update to new gradle action
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Nov 23, 2024
1 parent d3aa5f6 commit dff0dcd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit dff0dcd

Please sign in to comment.