-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use setup-java action directly in prepare release and use env approach (
#149)
- Loading branch information
Showing
3 changed files
with
35 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,16 +17,29 @@ jobs: | |
with: | ||
token: "${{ secrets.GH_PAT }}" | ||
- name: Setup JDK | ||
uses: ./.github/actions/setup-jdk | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
server-id: 'snapshot-repository' | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
- name: Prepare release | ||
run: | | ||
if [ -n "${{ github.event.inputs.next-version }}" ]; then | ||
EXTRA_ARGS=-DdevelopmentVersion=${{ github.event.inputs.next-version }} | ||
fi | ||
git config user.name "devopsHazelcast" | ||
git config user.email "<[email protected]>" | ||
./mvnw --batch-mode release:prepare -Prelease -Darguments="-DskipTests" -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} $EXTRA_ARGS | ||
./mvnw --batch-mode release:clean -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
./mvnw --batch-mode release:prepare -Prelease -Darguments="-DskipTests" $EXTRA_ARGS | ||
./mvnw --batch-mode release:clean | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.SONATYPE_OSS_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.SONATYPE_OSS_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
- name: Push changes | ||
run: | | ||
git push | ||
|