Skip to content

Commit a13e75b

Browse files
committed
ci: clean-deploy on tag and skip redundant verify
The two-step 'mvn verify' then 'mvn deploy -Prelease -DskipTests' on tag pushes leaves unsigned package outputs in target/ from step 1; step 2 re-enters the lifecycle without a clean, leaving artifact bytes out of sync with the .asc files produced by gpg:sign. Caused FLC v1.3.0-beta1 to fail Sonatype publish with 'Invalid signature' on the assembly zip and the sources and javadoc jars. Same fix verified on CompEvol/morph-models v1.3.0-beta3. Changes: - gate 'Build and test' to non-tag pushes - replace 'mvn deploy -Prelease -DskipTests' with 'mvn -Prelease clean deploy' so the release runs from a clean target/
1 parent 5fbf17b commit a13e75b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/ci-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ jobs:
4444
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
4545
4646
- name: Build and test
47+
if: "!startsWith(github.ref, 'refs/tags/v')"
4748
run: mvn verify
4849

4950
- name: Publish to Maven Central
5051
if: startsWith(github.ref, 'refs/tags/v')
51-
run: mvn deploy -Prelease -DskipTests
52+
run: mvn -Prelease clean deploy
5253
env:
5354
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
5455
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}

0 commit comments

Comments
 (0)