Skip to content

Release workflow: only run deploy in release:perform - #206

Merged
yfre merged 1 commit into
masterfrom
ci/release-skip-site-deploy
Oct 18, 2026
Merged

yfre merged 1 commit into
masterfrom
ci/release-skip-site-deploy

Conversation

@yfre

@yfre yfre commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Problem

The Stage Release on Master Branch workflow ends in failure even when the release itself succeeds. In the 2.0.9 run (39164630414), these steps all succeeded:

  • release:prepare: built, tested, tagged hap-2.0.9 and bumped master to 2.0.10-SNAPSHOT
  • release:perform deploy: uploaded hap-2.0.9 jar, pom, sources and javadoc to GitHub Packages

Then the run failed with:

Executing goals 'deploy site-deploy'...
[ERROR] Failed to check-in files to SCM: The git-push command failed.
fatal: could not read Username for 'https://github.com': No such device or address

maven-release-plugin uses deploy site-deploy as the default release:perform goals when the pom has a <distributionManagement><site> element. The site-deploy runs inside target/checkout, which has no git credentials, so maven-scm-publish-plugin can't push to gh-pages. 2.0.8 failed the same way after its artifacts were already published.

Change

Pass -Dgoals=deploy so release:perform only deploys the artifacts. goals is the user property of release:perform in maven-release-plugin 3.3.1 (checked with mvn help:describe).

The site keeps being published by the Java CI with Maven and Deploy workflow on pushes to master, which was fixed in #205.

Verification

This only takes effect on the next release run, which should then finish green.

🤖 Generated with Claude Code

maven-release-plugin defaults release:perform to 'deploy site-deploy'
because the pom has a distributionManagement/site element. The
site-deploy runs in the release checkout without git credentials and
fails with "could not read Username", marking every release run as
failed after the artifacts were already published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yfre
yfre merged commit 7c7678a into master Oct 18, 2026
1 check passed
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Maven release
run: mvn release:prepare release:perform -B -DreleaseVersion=${{ github.event.inputs.releaseVersion }}
# Only deploy; the site is published by the deploy workflow on pushes to master.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this comment? While Claude can be great, it sometimes is overly verbose, and it doesn't add any value here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Cody,

long time. decide to remove some dust from some old projects for which i had no time. hopefully with claude i can at least keep them up to date.
thank you for the review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and i didnt want bother you with minor changes and minor project, so, i have merged them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good! I've been extremely busy with both work and non-work for the last six months, so I appreciate others contributing!

yfre pushed a commit that referenced this pull request Oct 18, 2026
Addresses review feedback on #206.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants