From ced83fc0739f6b4edde313a8a2ae40c8b30149ba Mon Sep 17 00:00:00 2001 From: Mike Barkmin Date: Wed, 7 Oct 2026 19:43:01 +0200 Subject: [PATCH] Allow release retries after Maven Central publication --- .github/workflows/release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb10fd5c..d3bb7614 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,19 @@ name: Release on: + workflow_dispatch: pull_request: types: [closed] branches: - main +concurrency: + group: scratch-library-release + cancel-in-progress: false + jobs: validate: - if: github.event.pull_request.merged == true + if: github.event.pull_request.merged == true || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 @@ -23,7 +28,7 @@ jobs: release: needs: validate - if: github.event.pull_request.merged == true # only run if PR was merged + if: github.event.pull_request.merged == true || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') runs-on: ubuntu-latest permissions: @@ -61,7 +66,9 @@ jobs: - name: Deploy to Maven Central (signed) run: | mvn --version - mvn -B clean deploy -Pcentral -Dgpg.executable=gpg + # A previous attempt may have published to Central before a later + # catalog or GitHub upload failed. Reuse immutable published versions. + mvn -B clean deploy -Pcentral -Dgpg.executable=gpg -DignorePublishedComponents=true -DwaitUntil=published env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}