Skip to content

Commit a0385d6

Browse files
authored
Update maven-publish.yml
1 parent 121fd7f commit a0385d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/maven-publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ jobs:
2727
server-id: ossrh
2828
server-username: MAVEN_USERNAME
2929
server-password: MAVEN_PASSWORD
30+
31+
- name: Get the version
32+
id: get_version
33+
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
3034

3135
- name: Import GPG Key
3236
uses: crazy-max/ghaction-import-gpg@v1
@@ -35,7 +39,7 @@ jobs:
3539
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3640

3741
- name: Publish to the Maven Central Repository
38-
run: mvn --batch-mode deploy
42+
run: mvn -Dproject.version=${VERSION} --batch-mode deploy
3943
env:
4044
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
4145
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 commit comments

Comments
 (0)