From 7c60409eb4ab11310ef01971c544348a89bc90e4 Mon Sep 17 00:00:00 2001 From: Thomas Nield Date: Mon, 11 Jul 2022 18:58:37 -0500 Subject: [PATCH] tagged release wip --- .github/workflows/tagged-release.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/tagged-release.yml diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml new file mode 100644 index 00000000..3dc6a526 --- /dev/null +++ b/.github/workflows/tagged-release.yml @@ -0,0 +1,39 @@ +name: "tagged-release" + +on: + push: + tags: + - "v*" + +jobs: + publish: + runs-on: macos-11 + steps: + - uses: actions/checkout@v2 + - name: Set up Java for publishing to Maven Central Repository + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: build artifact + run: mvn clean package + - name: Create release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + artifacts: "${{ github.workspace }}/target/*.jar" + token: ${{ secrets.GITHUB_TOKEN }} + - name: Publish to the Maven Central Repository + run: | + mvn \ + --no-transfer-progress \ + --batch-mode \ + deploy + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \ No newline at end of file