ci: clean-deploy on tag, skip redundant verify (fixes signature failure)#11
Merged
Merged
Conversation
The two-step 'mvn verify' then 'mvn deploy -Prelease -DskipTests' on tag pushes leaves unsigned package outputs (assembly zip, sources jar) in target/ from step 1. Step 2 then re-enters the lifecycle without a clean, which can leave artifact bytes out of sync with the .asc files produced by gpg:sign during the verify phase. Symptom on v1.3.0-beta1: Sonatype Central rejected the deployment with 'Invalid signature' for flc-1.3.0-beta1.zip.asc, flc-1.3.0-beta1-sources.jar.asc, and flc-1.3.0-beta1-javadoc.jar.asc, while flc-1.3.0-beta1.jar.asc and flc-1.3.0-beta1.pom.asc verified. Fix: - Skip 'Build and test' on tag pushes (the deploy step now runs the full lifecycle including tests). - Replace 'mvn deploy -Prelease -DskipTests' with 'mvn -Prelease clean deploy' so the release runs from a clean target/. Verified by applying the same change to CompEvol/morph-models and publishing v1.3.0-beta3 to Maven Central successfully.
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.
Summary
The release workflow's two-step
mvn verifythenmvn deploy -Prelease -DskipTestsleaves unsigned package outputs intarget/from step 1, then re-enters the lifecycle in step 2 without aclean. Some artifact bytes end up out of sync with the.ascfiles thatgpg:signproduces, and Sonatype rejects the deployment.Symptom on v1.3.0-beta1
Tag push run #25204059838 failed with:
The main
flc-1.3.0-beta1.jar.ascand.pom.ascverified fine; only the assembly zip, sources jar, and javadoc jar failed.Fix
Build and testto non-tag pushes (the deploy step now runs the full lifecycle including tests).mvn deploy -Prelease -DskipTestswithmvn -Prelease clean deployso the release runs from a cleantarget/in a single mvn invocation.Verified
Applied the same change to
CompEvol/morph-modelsand successfully publishedv1.3.0-beta3to Maven Central — same workflow template, same plugin set (central-publishing-maven-plugin0.6.0,maven-gpg-plugin3.2.7).Re-releasing v1.3.0-beta1
The Sonatype staging deployment was rejected so the version isn't consumed on Central. To re-release after this PR merges, either delete and re-push the existing
v1.3.0-beta1tag, or cut av1.3.0-beta2.Test plan
morph-models-1.3.0-beta3.pomand.zipare HTTP 200 on Maven Central