Skip to content

ci(release): publish a tag only from green CI, and re-drive by tag input - #156

Merged
rennf93 merged 1 commit into
masterfrom
ci/release-from-green-ci
Oct 15, 2026
Merged

rennf93 merged 1 commit into
masterfrom
ci/release-from-green-ci

Conversation

@rennf93

@rennf93 rennf93 commented Oct 15, 2026

Copy link
Copy Markdown
Member

Closes #155

v4.4.0 failed its release gate on a lint that pull request CI never ran, after the tag was already immutable, and the workflow_dispatch path could not re-drive it from master because the tag check read GITHUB_REF_NAME. Both crates ended up published by hand with trusted publishing turned off.

This release workflow runs no lint or test of its own:

  • verify: resolves the tag from the release event or the manual tag input, checks it out, compares it to the guard-core-engine and guard-core-rs versions, and requires the newest push run of ci.yml, ecosystem-gate.yml, live-smoke.yml and fuzz.yml on that commit to have succeeded (it waits up to an hour, so a release created right after a merge does not fail).
  • publish: checks the tag out, gets a token through trusted publishing, and publishes the engine then the facade, skipping a version already on crates.io.

A re-drive is Actions > Release > Run workflow with the tag; it checks the tag out with master's fixed workflow. The trusted publisher entries match on repository and workflow file (release.yml, no environment), which are unchanged.

Tested locally: actionlint clean. The CI check run against the real commits: v4.4.0 (e9783d5) and be51b52 pass with all four workflows green; b3b7128, whose CI failed, is refused with ci.yml concluded failure. After merging I will dispatch it with tag v4.4.0 to prove the re-drive path end to end; both crates are already on crates.io, so the publish step skips them.

The release workflow no longer lints or tests at the tag. It requires the tagged commit's ci.yml, ecosystem-gate.yml, live-smoke.yml and fuzz.yml push runs to have succeeded (waiting up to an hour for them), checks the tag against the crate versions, and publishes guard-core-engine then guard-core-rs through trusted publishing, skipping a version already on crates.io. A manual run takes a tag input and checks that tag out, so master's workflow can publish an existing tag after a partial failure without turning trusted publishing off.
@github-actions github-actions Bot added the ci GitHub Actions and pre-commit label Oct 15, 2026
@rennf93
rennf93 merged commit 61921af into master Oct 15, 2026
12 checks passed
@rennf93
rennf93 deleted the ci/release-from-green-ci branch October 15, 2026 21:42
This was referenced Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci GitHub Actions and pre-commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish from green CI instead of re-gating at the tag

1 participant