体验新版 GitCode,发现更多精彩内容 >>
name: Maven Publish Snapshot on: push: branches: - master
paths-ignore: - '.github/**' - 'docs/**' - 'scripts/**' - '**.md' - '.*'
jobs: publish-snapshot: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup Apache Maven Central uses: actions/setup-java@v2 with: java-version: '8' distribution: 'zulu' server-id: sonatype-nexus-snapshots server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-passphrase: GPG_PASSPHRASE gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - name: Publish to Apache Maven Central run: mvn clean verify gpg:sign install:install deploy:deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}