diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index 4beda09..c4f23dd 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -29,16 +29,22 @@ jobs: with: ref: "${{ env.TAG }}" - name: Setup JDK - uses: ./.github/actions/setup-jdk + uses: actions/setup-java@v4 with: - server-id: release-repository + java-version: 17 + distribution: 'temurin' + cache: 'maven' + server-id: 'release-repository' + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Deploy release - run: ./mvnw deploy -Prelease --batch-mode -DskipTests -DretryFailedDeploymentCount=3 -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} + run: ./mvnw deploy -Prelease --batch-mode -DskipTests -DretryFailedDeploymentCount=3 env: MAVEN_USERNAME: ${{ secrets.SONATYPE_OSS_USERNAME }} MAVEN_PASSWORD: ${{ secrets.SONATYPE_OSS_PASSWORD }} - + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: diff --git a/.github/workflows/deploy-snapshot.yml b/.github/workflows/deploy-snapshot.yml index d938fba..1e67a8c 100644 --- a/.github/workflows/deploy-snapshot.yml +++ b/.github/workflows/deploy-snapshot.yml @@ -15,9 +15,16 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup JDK - uses: ./.github/actions/setup-jdk + uses: actions/setup-java@v4 with: - server-id: snapshot-repository + 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: Deploy snapshot run: ./mvnw deploy -Prelease-snapshot --batch-mode --update-snapshots -DskipTests -DretryFailedDeploymentCount=3 env: diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 8f66b93..40db398 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -17,7 +17,16 @@ 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 @@ -25,8 +34,12 @@ jobs: fi git config user.name "devopsHazelcast" git config user.email "" - ./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