Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from xezzon/develop
Browse files Browse the repository at this point in the history
通过 GitHub Actions 自动为 flatten-maven-plugin 设置版本
  • Loading branch information
xezzon authored Jan 27, 2024
2 parents 0a3cad2 + 1855d8a commit 893cd1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Get Tag
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "version=${TAG}" >> "$GITHUB_ENV"
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -36,7 +41,7 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import

- name: Publish to Apache Maven Central
run: mvn deploy -P report,release -DskipTests=true -Drevision=$GITHUB_REF
run: mvn deploy -P report,release -DskipTests=true -Drevision=$version
env:
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
Expand Down

0 comments on commit 893cd1c

Please sign in to comment.