From 32927555fc8cbc3e91390b55f8890b6afdf0b3d2 Mon Sep 17 00:00:00 2001 From: James McMullan Date: Thu, 27 Jul 2023 09:46:02 -0400 Subject: [PATCH] HPCC4J-501 Deploy artifacts via github action (#628) - Added a new github action workflow to publish builds on release tag Signed-off-by: James McMullan James.McMullan@lexisnexis.com Signed-off-by: James McMullan James.McMullan@lexisnexis.com --- .../workflows/publish-release-on-merge.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/publish-release-on-merge.yml diff --git a/.github/workflows/publish-release-on-merge.yml b/.github/workflows/publish-release-on-merge.yml new file mode 100644 index 000000000..d1e2893a2 --- /dev/null +++ b/.github/workflows/publish-release-on-merge.yml @@ -0,0 +1,26 @@ +name: Publish release to the Maven Central Repository +on: + push: + tags: + - '*-release' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Maven Central Repository + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'adopt' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.SIGNING_SECRET }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Publish package + run: mvn -Pjenkins-release -Dgpg.passphrase=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DstagingProgressTimeoutMinutes=20 clean deploy -e + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USER_NAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASS }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGN_MODULES_PASSPHRASE }} \ No newline at end of file