diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d7bad1a..1768daa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -215,18 +215,29 @@ jobs: *-SNAPSHOT) echo "OK: -SNAPSHOT version, continuing snapshot deploy." ;; *) echo "::error::Refusing to publish non-SNAPSHOT version '$VERSION' from the snapshot job. Snapshot publishing requires a -SNAPSHOT version; releases go through the v* tag path."; exit 1 ;; esac + # Informational only (nothing depends on it): logs the effective POM with the same + # profile as the deploy below, so the resolved central-publishing configuration + # (waitUntil/waitMaxTime etc.) is visible for debugging. + - name: Show effective POM (debug) + run: mvn --batch-mode --no-transfer-progress -P release help:effective-pom - name: Deploy snapshot run: mvn --batch-mode --no-transfer-progress -P release deploy -DskipTests env: MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }} MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + # Runs even when the deploy step failed: a Central publish-poll timeout reds the + # job *after* the bundle was uploaded (and typically published server-side), while + # the signed jars + .asc files already exist in target/ (signing happens at + # verify). Collecting on failure lets the github-snapshot job still attach them. - name: Collect signed artifacts + if: ${{ !cancelled() }} run: | mkdir -p signed-snapshot-assets cp target/*.jar signed-snapshot-assets/ 2>/dev/null || true cp target/*.jar.asc signed-snapshot-assets/ 2>/dev/null || true - uses: actions/upload-artifact@v7 + if: ${{ !cancelled() }} with: name: signed-snapshot-assets path: signed-snapshot-assets/ @@ -234,7 +245,10 @@ jobs: github-snapshot: name: Update Snapshot Pre-release on GitHub needs: [publish-snapshot] - if: needs.publish-snapshot.result == 'success' + # Also runs when publish-snapshot FAILED (not when skipped/cancelled): a Central + # publish-poll timeout reds that job after the artifacts were already uploaded — + # the GitHub pre-release assets must not be lost in that case. + if: ${{ !cancelled() && (needs.publish-snapshot.result == 'success' || needs.publish-snapshot.result == 'failure') }} runs-on: ubuntu-latest permissions: contents: write @@ -277,18 +291,29 @@ jobs: server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE + # Informational only (nothing depends on it): logs the effective POM with the same + # profile as the deploy below, so the resolved central-publishing configuration + # (waitUntil/waitMaxTime etc.) is visible for debugging. + - name: Show effective POM (debug) + run: mvn --batch-mode --no-transfer-progress -P release help:effective-pom - name: Deploy release run: mvn --batch-mode --no-transfer-progress -P release deploy -DskipTests env: MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }} MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + # Runs even when the deploy step failed: a Central publish-poll timeout reds the + # job *after* the bundle was uploaded (and typically published server-side), while + # the signed jars + .asc files already exist in target/ (signing happens at + # verify). Collecting on failure lets the github-release job still attach them. - name: Collect signed artifacts + if: ${{ !cancelled() }} run: | mkdir -p signed-release-assets cp target/*.jar signed-release-assets/ 2>/dev/null || true cp target/*.jar.asc signed-release-assets/ 2>/dev/null || true - uses: actions/upload-artifact@v7 + if: ${{ !cancelled() }} with: name: signed-release-assets path: signed-release-assets/ @@ -296,7 +321,10 @@ jobs: github-release: name: Attach Binaries to GitHub Release needs: [publish-release] - if: needs.publish-release.result == 'success' + # Also runs when publish-release FAILED (not when skipped/cancelled): a Central + # publish-poll timeout reds that job after the artifacts were already uploaded — + # the GitHub release assets must not be lost in that case. + if: ${{ !cancelled() && (needs.publish-release.result == 'success' || needs.publish-release.result == 'failure') }} runs-on: ubuntu-latest permissions: contents: write diff --git a/pom.xml b/pom.xml index 678df0c..7c49aee 100644 --- a/pom.xml +++ b/pom.xml @@ -350,7 +350,7 @@ SPDX-License-Identifier: Apache-2.0 org.pitest pitest-maven - 1.25.5 + 1.25.6 org.sonatype.central @@ -819,7 +819,10 @@ SPDX-License-Identifier: Apache-2.0 central true - published + + validated + + 21600