Skip to content

Commit

Permalink
feat: Add workflow
Browse files Browse the repository at this point in the history
  • 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.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit aacf2d5

Please sign in to comment.