-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liang.tang.yk
committed
Oct 11, 2023
1 parent
68fec74
commit aacf2d5
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Maven Central Repo Deployment | ||
Check notice Code scanning / Checkov (reported by Codacy) Ensure top-level permissions are not set to write-all Note
Ensure top-level permissions are not set to write-all
|
||
# 触发脚本的事件 这里为发布release之后触发 | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [ released ] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Git Repo | ||
uses: actions/checkout@v2 | ||
- name: Set up Maven Central Repo | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Set up Apache Maven Central | ||
uses: actions/setup-java@v1 | ||
with: # running setup-java again overwrites the settings.xml | ||
java-version: 11 | ||
server-id: sonatype-nexus-snapshots # Value of the distributionManagement/repository/id field of the pom.xml | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_CENTRAL_TOKEN | ||
Check warning Code scanning / Checkov (reported by Codacy) Base64 High Entropy String Warning
Base64 High Entropy String
|
||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
- name: Publish to Apache Maven Central | ||
run: mvn clean deploy -P release | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} |