diff --git a/.github/workflows/maven_build.yml b/.github/workflows/maven_build.yml index 677c17dca357c78e7d5bcd09ace311655d32ab57..fa919f19f00fdace54701019259bc94f27044859 100644 --- a/.github/workflows/maven_build.yml +++ b/.github/workflows/maven_build.yml @@ -1,9 +1,6 @@ name: Maven Build on: - push: - branches: - - master pull_request: branches: - master @@ -20,4 +17,4 @@ jobs: java-version: '8' distribution: 'zulu' - name: Build with Maven - run: mvn clean package + run: mvn clean install diff --git a/.github/workflows/maven_publish_snapshot.yml b/.github/workflows/maven_publish_snapshot.yml new file mode 100644 index 0000000000000000000000000000000000000000..417e944986ca5477603d821f6d6a5226ca38c6ab --- /dev/null +++ b/.github/workflows/maven_publish_snapshot.yml @@ -0,0 +1,28 @@ +name: Maven Publish Snapshot + +on: + push: + branches: + - master + +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 }}