ci: prevent CI from deploying release versions unsigned - #421
Merged
Conversation
The Deploy SNAPSHOT job runs `mvn deploy` without GPG signing on every push to release/6.0.x. When `release:prepare` pushes its `[maven-release-plugin] prepare release X.Y.Z` commit, the POM version is briefly the non-SNAPSHOT release version, so CI uploaded an unsigned bundle to the Central Portal, which fails validation with `Missing signature for file`. - maven.yml: the deploy step now reads project.version and skips unless it ends in -SNAPSHOT, so a release-plugin commit can never trigger a release deploy. - struts2-bootstrap-showcase/pom.xml: add skipPublishing=true to central-publishing-maven-plugin so the demo war is not published to Maven Central. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Releasing
6.1.0failed publishing to the Central Portal withMissing signature for filefor every artifact (run 28497025088).Root cause: the Deploy SNAPSHOT job runs
mvn deploywithout-Prelease(no GPG signing) on every push torelease/6.0.x. Whenmvn release:preparepushes its[maven-release-plugin] prepare release 6.1.0commit, the POM version is briefly the release version6.1.0, so CI uploaded an unsigned6.1.0bundle to the Portal — and that unsigned deployment, not the signed one fromrelease:perform, is what failed validation.Fix
maven.yml: the deploy step now readsproject.versionand skips unless it ends in-SNAPSHOT, so a release-plugin commit can never trigger a release deploy.struts2-bootstrap-showcase/pom.xml: add<skipPublishing>true</skipPublishing>tocentral-publishing-maven-pluginso the demo war is not published to Maven Central.Same approach as struts2-jquery#923, adapted to this repo (no
skipITs/integration-tests module here).🤖 Generated with Claude Code