From a443ea394e726430c5a25954e99a119c9b5ee758 Mon Sep 17 00:00:00 2001 From: Chris Vest Date: Sun, 9 Jun 2024 20:59:15 -0700 Subject: [PATCH 1/2] Add Release workflow --- .github/workflows/maven.yml | 2 +- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index fa648460..88024332 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,7 +17,7 @@ jobs: java-version: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.1.6 - name: Set up Java uses: actions/setup-java@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..21062a0c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release +on: + workflow_dispatch: + +jobs: + Release: + runs-on: ubuntu-latest + steps: + - name: Check out project + uses: actions/checkout@v4.1.6 + + # Configure Java + - uses: actions/setup-java@v4.2.1 + with: + distribution: 'zulu' + java-version: '11' + server-id: 'ossrh' + server-username: ${{ secrets.SONATYPE_USERNAME }} + server-password: ${{ secrets.SONATYPE_PASSWORD }} + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} + + - name: Configure Git + run: | + git config user.name "Release action on behalf of ${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + + - name: Verifying build + run: ./mvnw clean deploy -P release + + - name: Push pom updates and tags + run: | + git push --tags From b2da8e49d5d96b44b7f544e3ff663acee900fa8a Mon Sep 17 00:00:00 2001 From: Chris Vest Date: Sun, 9 Jun 2024 21:14:24 -0700 Subject: [PATCH 2/2] Use latest setup-java version in PR builds as well --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 88024332..7dbfb5e1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v4.1.6 - name: Set up Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v4.2.1 with: java-version: ${{ matrix.java-version }} distribution: 'zulu'