Setup pipeline #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish package to the Maven Central Repository | |
on: | |
push: | |
branches: [ "test" ] | |
pull_request: | |
branches: [ "test" ] | |
jobs: | |
release: | |
name: Release on Sonatype OSS | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 8 | |
distribution: 'adopt' | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Set up Apache Maven Central | |
uses: actions/setup-java@v2 | |
with: # running setup-java again overwrites the settings.xml | |
java-version: 8 | |
distribution: 'adopt' | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Publish to Apache Maven Central | |
run: mvn deploy #-Prelease | |
env: | |
OSSRH_USERNAME: OSSRH_USERNAME | |
OSSRH_PASSWORD: OSSRH_PASSWORD | |
MAVEN_GPG_PASSPHRASE: MAVEN_GPG_PASSPHRASE |