maven_publish_snapshot.yml 952 字节
Newer Older
H
He Wang 已提交
1 2 3 4 5 6
name: Maven Publish Snapshot

on:
  push:
    branches:
      - master
H
He Wang 已提交
7 8 9 10 11 12
    paths-ignore:
      - '.github/**'
      - 'docs/**'
      - 'scripts/**'
      - '**.md'
      - '.*'
H
He Wang 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

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 }}