Skip to content

Add manual publish control to CI workflow#241

Merged
bernardladenthin merged 3 commits into
mainfrom
claude/stoic-franklin-67klln
Jun 18, 2026
Merged

Add manual publish control to CI workflow#241
bernardladenthin merged 3 commits into
mainfrom
claude/stoic-franklin-67klln

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • Add publish_to_central boolean input to workflow_dispatch to allow manual control over Maven Central publishing
  • Require -SNAPSHOT version in snapshot publish job to prevent accidental release version deployments
  • Gate both snapshot and release publish jobs on the new input flag

Test plan

  • CI is green on this branch
  • Workflow syntax is valid (GitHub Actions will validate on merge)

Related issues / PRs

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes (if there are, I have notified the maintainer privately per SECURITY.md)

Details

This change adds safety guards to the Maven Central publishing workflow:

  1. Manual dispatch control: The workflow_dispatch trigger now accepts a publish_to_central boolean input (default: false), allowing developers to manually trigger the workflow without automatically publishing artifacts.

  2. Snapshot version guard: The publish-snapshot job now includes a validation step that ensures the project version ends with -SNAPSHOT before deploying. This prevents accidentally publishing release versions through the snapshot pipeline.

  3. Gated publish jobs: Both publish-snapshot and publish-release jobs now require inputs.publish_to_central to be true, in addition to their existing checks (check-snapshot and check-tag results).

These changes improve safety by preventing unintended artifact deployments while maintaining the existing tag-based release automation.

https://claude.ai/code/session_01JGZdUCy6YnTzKSJKA6B6KZ

claude added 3 commits June 18, 2026 16:50
…se flag

Add a workflow_dispatch boolean input 'publish_release' (default false) and
require it on the publish-release job in addition to the existing v* tag
guard. A v* tag push alone no longer auto-publishes to Maven Central;
releasing now requires running the Publish workflow on the v* tag with
publish_release enabled (tag AND flag). publish-snapshot is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JGZdUCy6YnTzKSJKA6B6KZ
…SHOT

Add a guard step to the publish-snapshot job that resolves project.version via
`mvn help:evaluate` and fails the job unless the version ends in -SNAPSHOT.

central-publishing routes purely by version: a release version (no -SNAPSHOT)
deployed through the snapshot path lands in the permanent Maven Central release
store, not the snapshot store. This guard stops that from ever happening from the
snapshot job; releases continue to go through the v* tag path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JGZdUCy6YnTzKSJKA6B6KZ
…h_to_central flag

Generalize the release-only publish_release input into a general
publish_to_central boolean and require it on BOTH publish-snapshot and
publish-release, matching the BitcoinAddressFinder sibling pipeline.

Central publishing now runs only from a manual workflow_dispatch with the flag
enabled; pushes to main and v* tag pushes no longer auto-deploy. Snapshot vs
release is still decided by the POM version, and the -SNAPSHOT guard added in the
previous commit blocks a release version from ever shipping via the snapshot job.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JGZdUCy6YnTzKSJKA6B6KZ
@bernardladenthin bernardladenthin merged commit b502a1c into main Jun 18, 2026
8 of 10 checks passed
@bernardladenthin bernardladenthin deleted the claude/stoic-franklin-67klln branch June 18, 2026 19:16
@sonarqubecloud

Copy link
Copy Markdown

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