Skip to content

Workflow file for this run

name: Maven Central Repo Deployment
on:
workflow_dispatch:
release:
types: [released]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Maven Central Repo
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh # 这个很重要需要和distributionManagement/repository/id一致(plugin内也一致)
server-username: ${{ secrets.PUBLISH_OSSRH_USER }}
server-password: ${{ secrets.PUBLISH_OSSRH_PASSWORD }}
gpg-passphrase: ${{ secrets.PUBLISH_GPG_PASSWORD }}
- name: Publish to Maven Central Repo
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.PUBLISH_GPG_SECRET }}
gpg_passphrase: ${{ secrets.PUBLISH_GPG_PASSWORD }}
nexus_username: ${{ secrets.PUBLISH_OSSRH_USER }}
nexus_password: ${{ secrets.PUBLISH_OSSRH_PASSWORD }}
maven_profiles: sonatype-release
maven_goals_phases: clean deploy -DskipTests=true