Skip to content

ci: retire Pages snapshot push; use SONATYPE_* for Central - #12

Open
Pinont wants to merge 2 commits into
mainfrom
cursor/fix-pages-repo-snapshot-publish-bc4a
Open

ci: retire Pages snapshot push; use SONATYPE_* for Central#12
Pinont wants to merge 2 commits into
mainfrom
cursor/fix-pages-repo-snapshot-publish-bc4a

Conversation

@Pinont

@Pinont Pinont commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Why

Nont confirmed there is no usable GitHub Actions secret for pushing to Pinont/singularity-maven. SONATYPE_USERNAME / SONATYPE_PASSWORD are Maven Central Portal user/token only — they cannot authenticate a git push, and Central does not accept SNAPSHOT uploads.

#11 already merged onto main and still git-pushes gh-pages with an empty token, so publish-public-repo will keep failing on every push to main / rework/v2. Snapshots already live on GitHub Packages (io.github.pinont.singularitylib:2.0.0-SNAPSHOT, deployed by build.yml with GITHUB_TOKEN). maven.pinont.me is a stale Pages archive.

release.yml job publish-central still reads secrets.MAVEN_CENTRAL_USERNAME / secrets.MAVEN_CENTRAL_PASSWORD on main. It also runs on every merged PR to main. pom is 2.0.0-SNAPSHOT and tag 2.0.0 already exists, so merging this CI-only PR without a guard would derive 2.0.0-Hotfix-1 and try to publish.

What

  • Gut pages-repo.yml: dispatch-only no-op. Comment records the policy (GitHub Packages for snapshots, frozen Pages archive, Central via release.yml). No on: push, no git clone/push, no invented git token.
  • release.yml Central upload now uses secrets.SONATYPE_USERNAME / secrets.SONATYPE_PASSWORD. No other secrets renamed.
  • release and publish-central jobs only run when the merged PR has the release label:
    merged == true && contains(join(labels.*.name, ','), 'release').
    Future Central/GitHub releases need that label on the PR. This PR must not have it.
  • No SNAPSHOT deploy to Central.
  • JavaDoc publishing left to docs: JavaDoc site on maven.pinont.me #10.

Out of scope

  • Do not merge this PR with a release label.
  • No tags.
  • README snapshot URL (maven.pinont.me) left as-is.

Verify

  • git grep -n MAVEN_REPO_TOKEN is empty on this branch.
  • release.yml Central curl uses SONATYPE_USERNAME / SONATYPE_PASSWORD.
  • publish-public-repo is dispatch-only and never git-pushes.
  • Merging ci: retire Pages snapshot push; use SONATYPE_* for Central #12 without a release label skips both release and publish-central.
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 2, 2026 05:13
publish-public-repo cannot git-push Pinont/singularity-maven: the
only GitHub secret that existed for that path is empty, and
SONATYPE_USERNAME / SONATYPE_PASSWORD are Maven Central Portal
credentials (not a git token). Snapshots already go to GitHub
Packages via build.yml. maven.pinont.me stays a frozen archive.

Gut pages-repo.yml to a dispatch-only no-op (no push trigger, so
it no longer fails on every main / rework/v2 push). Point
release.yml Central upload at SONATYPE_USERNAME / SONATYPE_PASSWORD.

Co-authored-by: Nonnipat Tangrojjanakhajorn <contact@pinont.me>
release.yml ran on every merge to main. pom is 2.0.0-SNAPSHOT and
tag 2.0.0 already exists, so merging this CI-only PR would derive
2.0.0-Hotfix-1. Gate both release and publish-central on the
release label in addition to merged==true.

Co-authored-by: Nonnipat Tangrojjanakhajorn <contact@pinont.me>
@Pinont
Pinont marked this pull request as ready for review September 2, 2026 05:16
Copilot AI lite review requested due to automatic review settings September 2, 2026 05:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The release label gate currently uses substring matching and could trigger releases for similarly named labels (e.g., pre-release), risking unintended publishing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adjusts CI/CD workflows to stop attempting GitHub Pages-based snapshot publishing and to tighten/modernize Maven Central publishing credentials and release gating for SingularityLib.

Changes:

  • Retires publish-public-repo by removing the push-triggered Pages snapshot deploy logic and leaving a dispatch-only informational job.
  • Updates release.yml to use SONATYPE_USERNAME / SONATYPE_PASSWORD for Central upload.
  • Gates both the release and Central publish jobs behind a PR release label to prevent unintended releases on routine merges.
File summaries
File Description
.github/workflows/release.yml Adds a release-label gate for release/Central jobs and switches Central credentials to SONATYPE_*.
.github/workflows/pages-repo.yml Removes snapshot git-push workflow logic; keeps a dispatch-only job that documents the retirement/policy.
Review details

Suppressed comments (1)

.github/workflows/release.yml:177

  • Same substring-based label check here: contains(join(...), 'release') can match labels like pre-release and unintentionally run the Central publish path. Prefer contains(labels.*.name, 'release') for an exact label match.
    if: github.event.pull_request.merged == true && contains(join(github.event.pull_request.labels.*.name, ','), 'release')
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

if: github.event.pull_request.merged == true
# Only tagged product releases. Merging a CI/docs PR to main without the
# `release` label must not derive a hotfix tag or publish.
if: github.event.pull_request.merged == true && contains(join(github.event.pull_request.labels.*.name, ','), 'release')
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.

3 participants