Skip to content

Commit

Permalink
ci: fix github action for release
Browse files Browse the repository at this point in the history
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
  • Loading branch information
evacchi committed Nov 13, 2024
1 parent d2f00de commit 7dcb359
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

Expand All @@ -53,25 +53,24 @@ jobs:
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.release-version }}
git add .
git commit -m "Release version update ${{ github.event.inputs.release-version }}"
git push
git tag ${{ github.event.inputs.release-version }}
git push origin ${{ github.event.inputs.release-version }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Release to Maven Central
run: |
mvn --batch-mode clean verify deploy -X
env:
MAVEN_USERNAME: ${{ secrets.JRELEASER_NEXUS2_PASSWORD }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.JRELEASER_NEXUS2_USERNAME }}
MAVEN_USERNAME: ${{ secrets.JRELEASER_NEXUS2_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}

- name: Back to Snapshot
- name: Back to Snapshot and Push
run: |
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=999-SNAPSHOT
git add .
git commit -m "Snapshot version update"
git push
git push origin ${{ github.event.inputs.release-version }}
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 7dcb359

Please sign in to comment.