From a3feec67d680f817917971bcf9a4ada378dcc06c Mon Sep 17 00:00:00 2001 From: Nees Jan van Eck <36573334+neesjanvaneck@users.noreply.github.com> Date: Mon, 22 Jan 2024 13:53:57 +0100 Subject: [PATCH] Add GitHub Actions publish workflow --- .github/workflows/publish-release.yml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..f2d0028 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,32 @@ +# This workflow will build a package using Gradle and then publish it to GitHub Packages and the Maven Central Repository. +# For more information see: https://github.com/actions/setup-java#publishing-using-gradle + +name: Publish package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + - name: Build with Gradle + run: gradle build + - name: Publish package to GitHub Packages and the Maven Central Repository + run: gradle publish + env: + GITHUB_ACTOR: ${{ github.actor }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} + GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}