From 55f44c923acd6310e52570491034af62e79e2cfd Mon Sep 17 00:00:00 2001 From: Keegan Witt Date: Wed, 21 Jan 2026 22:37:15 -0500 Subject: [PATCH] ci: Automate releases --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file 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 00000000..ac549464 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + workflow_dispatch: + inputs: + releaseVersion: + description: "Release version (e.g. 1.0.0)" + required: true + nextVersion: + description: "Next snapshot version (e.g. 1.0.1-SNAPSHOT)" + required: true + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ssh-key: ${{ secrets.GIT_SSH_KEY }} + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + cache: 'maven' + server-id: central + server-username: MAVEN_CENTRAL_TOKEN_USER + server-password: MAVEN_CENTRAL_TOKEN_PASS + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: GPG_PASSPHRASE + + - name: Configure Git + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + + - name: Release + run: mvn -B release:prepare release:perform -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.nextVersion }} + env: + MAVEN_CENTRAL_TOKEN_USER: ${{ secrets.MAVEN_CENTRAL_TOKEN_USER }} + MAVEN_CENTRAL_TOKEN_PASS: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASS }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}