Skip to content

Commit

Permalink
upgrade setup-gradle tasks (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjungling authored Aug 19, 2024
1 parent 415d9e9 commit 672e382
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci-gradle-nexus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,18 @@ jobs:
run: gu install ${{ inputs.install_graal_languages }}
########################

- name: build
- name: setup gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: ${{ env.GRADLE_SWITCHES }} build
- name: build
run: ./gradlew ${{ env.GRADLE_SWITCHES }} build


- name: publish-snapshots
if: inputs.publish_snapshots && github.event_name != 'pull_request' && github.repository_owner == 'moderneinc'
uses: gradle/actions/setup-gradle@v4
with:
arguments: ${{ env.GRADLE_SWITCHES }} snapshot publish -PforceSigning -x test
- name: build
if: inputs.publish_snapshots && github.event_name != 'pull_request' && github.repository_owner == 'moderneinc'
run: ./gradlew ${{ env.GRADLE_SWITCHES }} snapshot publish -PforceSigning -x test
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ossrh_username }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ossrh_token }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ jobs:
distribution: temurin
java-version: ${{ inputs.java_version }}

- name: build
- name: setup gradle
uses: gradle/actions/setup-gradle@v4
with:
arguments: ${{ env.GRADLE_SWITCHES }} build
- name: build
run: ./gradlew ${{ env.GRADLE_SWITCHES }} build

- name: publish-tests
uses: EnricoMi/publish-unit-test-result-action@v2
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/publish-containerized-gradle-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ jobs:
rm -rf /opt/hostedtoolcache/go
rm -rf /opt/hostedtoolcache/node
- name: build, tag, and push docker image
- name: set up gradle
uses: gradle/actions/setup-gradle@v4
- name: build, tag, and push docker image
env:
TESTCONTAINERS_RYUK_DISABLED: true
GRGIT_USER: ${{ github.actor }}
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
MODERNE_ARTIFACTORY_USERNAME: ${{ secrets.moderne_artifactory_username }}
MODERNE_ARTIFACTORY_PASSWORD: ${{ secrets.moderne_artifactory_password }}
with:
arguments: ${{ env.GRADLE_SWITCHES }} -Prelease.scope=${{ inputs.release_scope }} final -x test
run: ./gradlew ${{ env.GRADLE_SWITCHES }} -Prelease.scope=${{ inputs.release_scope }} final -x test


- name: Send notification on error
if: ${{ failure() }}
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/publish-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,29 @@ jobs:
distribution: temurin
java-version: 17

- name: setup gradle
uses: gradle/actions/setup-gradle@v4

- name: publish-candidate
if: contains(github.ref, '-rc.')
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
${{ env.GRADLE_SWITCHES }}
-Preleasing
-Prelease.disableGitChecks=true
-Prelease.useLastTag=true
candidate
publish
run: |
./gradlew \
${{ env.GRADLE_SWITCHES }} \
-Preleasing \
-Prelease.disableGitChecks=true \
-Prelease.useLastTag=true \
candidate \
publish \
closeAndReleaseSonatypeStagingRepository
- name: publish-release
if: (!contains(github.ref, '-rc.'))
uses: gradle/actions/setup-gradle@v4
with:
arguments: |
${{ env.GRADLE_SWITCHES }}
-Preleasing
-Prelease.disableGitChecks=true
-Prelease.useLastTag=true
final
publish
run: |
./gradlew \
${{ env.GRADLE_SWITCHES }} \
-Preleasing \
-Prelease.disableGitChecks=true \
-Prelease.useLastTag=true \
final \
publish \
closeAndReleaseSonatypeStagingRepository

0 comments on commit 672e382

Please sign in to comment.