Skip to content

Commit

Permalink
refactor(GitHub): Setup Gradle only once
Browse files Browse the repository at this point in the history
Follow the recommendation from [1] and setup Gradle only once, with
subsquent steps invoking Gradle directly with a `run` step.

[1]: https://github.com/gradle/gradle-build-action/blob/main/README.md#use-the-action-to-setup-gradle

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Sep 21, 2023
1 parent f11076a commit fec42d9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,19 @@ jobs:
with:
distribution: temurin
java-version: 17
- name: Publish to OSSRH
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Publish to OSSRH
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
with:
gradle-home-cache-cleanup: true
arguments: publishAllPublicationsToOSSRHRepository
run: ./gradlew publishAllPublicationsToOSSRHRepository
- name: Build ORT Distributions
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
arguments: :cli:distZip :helper-cli:distZip
run: ./gradlew :cli:distZip :helper-cli:distZip
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit fec42d9

Please sign in to comment.