Skip to content

Commit

Permalink
Maven publish : strip v from tag version
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric de Launois committed Feb 26, 2025
1 parent ab51752 commit 6398311
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
permissions:
contents: read
packages: write
Expand All @@ -23,9 +26,13 @@ jobs:
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Write release version
run: |
VERSION=${{ github.event.release.tag_name }}
echo "VERSION=${VERSION#v}" >> $GITHUB_ENV
- name: Set version
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}
run: mvn versions:set -DnewVersion=${VERSION}
- name: Publish package
run: mvn --batch-mode deploy -DskipTests
env:
Expand Down

0 comments on commit 6398311

Please sign in to comment.