From 6b86b864b008c90ea0ddee2297c99069eaf25d52 Mon Sep 17 00:00:00 2001 From: Martin Junghanns Date: Sun, 14 Feb 2021 18:57:58 +0100 Subject: [PATCH] Setup release action --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ pom.xml | 6 ++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..73a5388 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release + +on: + release: + types: [ published ] + +jobs: + release: + name: Release on Sonatype OSS + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Set up Apache Maven Central + uses: actions/setup-java@v1 + with: # running setup-java again overwrites the settings.xml + java-version: 11 + 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 -Prelease deploy + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 045aae5..33b66a0 100644 --- a/pom.xml +++ b/pom.xml @@ -141,6 +141,12 @@ org.apache.maven.plugins maven-gpg-plugin ${plugin.maven-gpg.version} + + + --pinentry-mode + loopback + + sign_artifacts