Skip to content

ci(release): comment on no pull request, and complete a release that failed after publishing - #241

Merged
AdCodicem merged 2 commits into
mainfrom
ccr-c8a330d8-r0lvqa
Oct 29, 2026
Merged

AdCodicem merged 2 commits into
mainfrom
ccr-c8a330d8-r0lvqa

Conversation

@AdCodicem

@AdCodicem AdCodicem commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Why

The 0.3.0 release run (job) failed in the success step of @semantic-release/github. By then the tag, the push to nuget.org and the draft release were already done:

RequestError [HttpError]: The request could not be processed because too many files changed
GET https://api.github.com/repos/AdCodicem/AdCodicem.ValueObjects/pulls/227 → 422

Before posting its comments, the plugin (12.0.9, lib/success.js) fetches every pull request associated with a released commit. A PR merged with Rebase and merge has no commit with the same SHA, so the plugin falls back to GET /pulls/{n}, and the 422 GitHub returns for #227 is not caught. successCommentCondition is only evaluated after these reads, so it cannot exclude a single PR. Because the release job failed, attest provenance and publish documentation were skipped.

The release cannot be finished with what exists today. Re-running the job runs the dispatched commit's semantic-release again. A new dispatch computes 0.3.0 again, a version already tagged. So 0.3.0 stays a draft.

What

  1. ci(release): comment on no pull request after a release
    • .releaserc.json: successComment is replaced by successCommentCondition: false, which skips the whole step: no reads, no comments.
    • A test in release-config.test.mjs.
  2. ci(release): complete a release that failed after semantic-release published
    • New complete input on release.yml (a stable tag). With it set, every job is skipped except these three:
      • resume: runs in the nuget-stable environment, so it needs the same approval as a release. It refuses a dry run and anything that is not a vX.Y.Z tag. It also refuses a tag that is missing or not in the dispatched commit's history, a tag with no release, and a release that is already published.
      • attest provenance: attests the draft's own .nupkg/.snupkg files and their assemblies (the files semantic-release attached from the pack artifact, which was checked against its digests), attaches the bundle, then publishes the draft. It signs as release.yml, as a normal release does.
      • publish documentation: deploys the site at the tag.
    • The normal path is unchanged; its condition only gains an || needs.resume.result == 'success'.
    • docs/maintaining.md and .github/CLAUDE.md are updated.

node --test '.github/scripts/*.test.mjs' passes locally (5/5). actionlint could not run in this environment; the workflows job checks it.

After the merge

Dispatch release from main with complete: v0.3.0, then approve nuget-stable.

🤖 Generated with Claude Code

https://claude.ai/code/session_018bXdF3LqPfoQDtE8WnZkcW

@semantic-release/github's success step reads every pull request a released commit came from; GitHub answers 422
for #227, which changed too many files, and the step failed after the tag, the push to nuget.org and the draft, so
attest provenance and publish documentation never ran for 0.3.0. successCommentCondition: false skips the step's
reads altogether.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018bXdF3LqPfoQDtE8WnZkcW
…blished

A release dispatched with complete set to a stable tag skips every job but resume, attest provenance and publish
documentation: resume, in the nuget-stable environment, checks that the tag is on the dispatched commit's history and
that its GitHub Release is still a draft; attest provenance then attests the draft's own packages and their
assemblies, attaches the bundle and publishes it, and the site is deployed at the tag. Neither a re-run nor a new
dispatch could reach those jobs once semantic-release had tagged, which left 0.3.0 a draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018bXdF3LqPfoQDtE8WnZkcW
@AdCodicem AdCodicem changed the title ci(release): comment on no pull request after a release ci(release): comment on no pull request, and complete a release that failed after publishing Oct 29, 2026
@AdCodicem
AdCodicem merged commit 298a549 into main Oct 29, 2026
19 checks passed
@AdCodicem
AdCodicem deleted the ccr-c8a330d8-r0lvqa branch October 29, 2026 07:34
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