Skip to content

Commit

Permalink
Merge pull request #223 from bric3/setup-gradle
Browse files Browse the repository at this point in the history
chore: move GHA worflows to setup-gradle
  • Loading branch information
bric3 authored Feb 3, 2024
2 parents 07aa670 + 7aa30db commit 1345010
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
distribution: 'zulu'

- name: Setup Gradle
id: build-gradle
uses: gradle/gradle-build-action@v2
id: setup-gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
run: ./gradlew build --stacktrace
Expand Down Expand Up @@ -71,15 +71,13 @@ jobs:
})
- name: Publish snapshot when on master
uses: gradle/gradle-build-action@v2
if: success() && github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHUSERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHPASSWORD }}
with:
arguments: publish -Ppublish.central=true -Psemver.stage=snapshot
run: ./gradlew publish -Ppublish.central=true -Psemver.stage=snapshot

# This job will update the PR with the JUnit report
# In order to be able to make the most of it this job in particular has
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ jobs:
with:
java-version: '19'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Publish to Staging Repository
uses: gradle/gradle-build-action@v2
if: success()
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHUSERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHPASSWORD }}
with:
# com.javiersc.semver.gradle.plugin should pick the actual tag
arguments: publish -Ppublish.central=true
# com.javiersc.semver.gradle.plugin should pick the actual tag
run: ./gradlew publish -Ppublish.central=true

# Don't forget to deploy the release to central
# * 'Close' the repo to trigger the evaluations of to components against the requirements
Expand Down

0 comments on commit 1345010

Please sign in to comment.