8000 fix(promote): find the draft release by listing and publish it under its tag by norrietaylor · Pull Request #2220 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(promote): find the draft release by listing and publish it under its tag - #2220

Merged
norrietaylor merged 1 commit into
release/0.7.0from
fix/promote-finds-the-draft-release
Oct 15, 2026
Merged

norrietaylor merged 1 commit into
release/0.7.0from
fix/promote-finds-the-draft-release

Conversation

@norrietaylor
Copy link
Copy Markdown
Member

Summary

The stable promotion of 0.7.0 (run 38675564768) pointed the channel at 0.7.0, but its publish job failed with no GitHub Release v0.7.0. The release had to be published by hand. This fixes the two causes.

  1. The lookup cannot see a draft. The job asked gh release view v<semver>. A draft has no tag yet, so both that command and releases/tags/<tag> return 404, for exactly the release the job exists to publish. The job now lists releases and matches tag_name, which the listing does report for a draft. It refuses if more than one release carries the tag.
  2. Publishing a draft without tag_name uses the wrong tag. When I published the 0.7.0 draft by id without tag_name, GitHub tagged it untagged-<hex> rather than v0.7.0. That needed a second edit and a tag deletion to repair. The job now publishes by id with tag_name and target_commitish set, plus make_latest true, or false for a prerelease.

The already-public path is unchanged: re-runs and rollbacks still check that the tag sits on the release's target.

The same lookup was in publish-packages.yml before #2214 moved it here. That file is still on main, so main needs the same fix. The forward-port PR carries it.

Test plan

  • actionlint .github/workflows/promote.yml: clean.
  • I extracted the step's script from the workflow, stubbed the PATCH as an echo, and ran it against the live API with GITHUB_REPOSITORY=gominimal/minimal:
    • VERSION=0.7.0: GitHub Release v0.7.0 is already published at 3539ace0f…; leaving it as it is
    • VERSION=9.9.9: no GitHub Release v9.9.9 — …
    • VERSION=abc123: promoted version 'abc123' is not a semver (a nightly sha) — nothing versioned to publish
  • Draft path, by hand only. No draft exists to run the step against, because the rc drafts have been deleted. Before 0.7.0 was published, a release listing filtered on tag_name == "v0.7.0" returned the draft. Re-publishing release 413354529 with tag_name=v0.7.0 moved it to refs/tags/v0.7.0 on 3539ace0f. The full job runs for the first time on the next stable promotion.

…its tag

The publish job looked the release up with `gh release view v<semver>`.
A draft has no tag yet, so the lookup answered 404 for exactly the
release the job exists to publish, and the 0.7.0 promotion failed there.
Publishing a draft without naming tag_name also tags it with the draft's
untagged-<hex> placeholder rather than v<semver>.

The job now finds the release by listing releases and matching
tag_name, refuses when more than one carries the tag, and publishes by
id with tag_name and target_commitish set.
@norrietaylor
norrietaylor requested a review from a team as a code owner October 15, 2026 03:30
@coderabbitai
coderabbitai Bot commented Oct 15, 2026
Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 6c023915-555b-441d-a761-255999a5153d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@minimal-foundry
minimal-foundry Bot commented Oct 15, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at 12bab88a7562.

Nothing to do.

Clobber: none: git log -- .github/workflows/promote.yml shows the previous commit was the move from publish-packages.yml (#2214), not a fix being reverted.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

correctness

minimal-review — approved

Verdict APPROVE — No findings.

security

minimal-review — approved

Verdict APPROVE — No findings.

supply-chain

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 15, 2026
@norrietaylor
norrietaylor merged commit a7a33b0 into release/0.7.0 Oct 15, 2026
32 checks passed
@norrietaylor
norrietaylor deleted the fix/promote-finds-the-draft-release branch October 15, 2026 16:10
yermakoffivan pushed a commit to yermakoffivan/minimal that referenced this pull request Oct 22, 2026
* fix(promote): find the draft release by listing and publish it under its tag (gominimal#2220)

The publish job looked the release up with `gh release view v<semver>`.
A draft has no tag yet, so the lookup answered 404 for exactly the
release the job exists to publish, and the 0.7.0 promotion failed there.
Publishing a draft without naming tag_name also tags it with the draft's
untagged-<hex> placeholder rather than v<semver>.

The job now finds the release by listing releases and matching
tag_name, refuses when more than one carries the tag, and publishes by
id with tag_name and target_commitish set.

* fix(deps): bump rustls-webpki and webpki-root-certs past the emSign advisories (gominimal#2466)

RUSTSEC-2026-0382 (rustls-webpki 0.103.15) and RUSTSEC-2026-0383 (webpki-root-certs
1.0.9), both published 2026-10-20, red cargo-deny on every PR. rustls-webpki 0.103.16 rejects
paths through the distrusted emSign intermediates, and webpki-root-certs 1.0.10 drops the emSign
ECC Root CA - G3. Lockfile-only change.

(cherry picked from commit c0ac8c5)

* chore(release): bump version to 0.7.1

Hotfix release carrying the rustls-webpki and webpki-root-certs bumps
from gominimal#2466 (RUSTSEC-2026-0382, RUSTSEC-2026-0383) onto 0.7.0.

Claude-Session: https://claude.ai/code/session_01FnY4WzhrnmSEByMntmqsVF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0