Skip to content

ci(release): add release-proposal-dispatch workflow - #280

Open
iunanua wants to merge 9 commits into
mainfrom
igor/release-automation-wf
Open

ci(release): add release-proposal-dispatch workflow#280
iunanua wants to merge 9 commits into
mainfrom
igor/release-automation-wf

Conversation

@iunanua

@iunanua iunanua commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

What

Adds the Release proposal GitHub workflow that drives scripts/prepare-release.sh (merged in #279), plus its supporting pieces:

  • .github/workflows/release-proposal-dispatch.yamlworkflow_dispatch → resolve toolchain → install cargo-release/git-cliffprepare-release.sh → signed commit via commit-headless → PR via octo-sts.
  • .github/workflows/chainguard/self.write.pr.sts.yaml — the self.write.pr STS policy used to mint the PR token.
  • prepare-release.sh — new --no-codex-check flag (the workflow passes it, since the PR checklist carries the Codex review).

How to use

  • Normal release: dispatch the workflow from main with a version (minor, patch, major, or an exact 0.6.0 / 0.6.0-rc.1). It opens a chore(release): proposal vX.Y.Z PR.
  • Hotfix: still dispatch from main, but set the base-branch input to the hotfix line (e.g. hotfix/0.5.x). The STS policy requires a protected branch, so the workflow must always be dispatched from main; base-branch controls what gets checked out and where the PR is targeted.

Testing from a non-protected branch

No STS token can be minted off a protected branch, so the workflow falls back to a test run: it pushes the proposal branch unsigned and skips PR creation, logging a ::warning::/::notice:: explaining what was skipped. This lets the full prepare → commit → push flow be exercised without signing/PR permissions.

Notes

  • Does not tag or publish — after the proposal PR merges, tag the commit to trigger publish.yaml.
  • Stacked on the release-automation work merged in ci: release automation #279.

@datadog-official

datadog-official Bot commented Jul 27, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 46c0ec4 | Docs | Datadog PR Page | Give us feedback!

@iunanua
iunanua force-pushed the igor/release-automation-wf branch 3 times, most recently from d189bb6 to 3357d9a Compare July 27, 2026 14:59
- add the Release proposal workflow: dispatch -> prepare-release.sh -> signed commit via
  commit-headless -> PR via octo-sts, with a test-mode fallback (unsigned push, no PR) when no
  STS token can be minted (e.g. a non-protected branch)
- add the self.write.pr STS policy
- prepare-release.sh: add --no-codex-check to skip the Codex Findings prompt (used by the workflow)
- publish.yaml: resolve the Rust toolchain from Cargo.toml instead of hardcoding it
@iunanua
iunanua force-pushed the igor/release-automation-wf branch from 3357d9a to b7c3680 Compare July 27, 2026 15:33
@iunanua
iunanua force-pushed the igor/release-automation-wf branch 2 times, most recently from 4b6cc18 to d1e0f0a Compare July 28, 2026 13:44
@iunanua
iunanua force-pushed the igor/release-automation-wf branch from d1e0f0a to 6939939 Compare July 28, 2026 14:07
@iunanua
iunanua marked this pull request as ready for review July 29, 2026 08:42
@iunanua
iunanua requested a review from a team as a code owner July 29, 2026 08:42

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6939939fe2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/release-proposal-dispatch.yaml
Comment thread .github/workflows/release-proposal-dispatch.yaml
Comment thread .github/workflows/release-proposal-dispatch.yaml Outdated
Comment thread .github/chainguard/self.write.pr.sts.yaml Outdated
Comment thread .github/workflows/release-proposal-dispatch.yaml
@iunanua
iunanua marked this pull request as draft July 29, 2026 09:25
iunanua and others added 3 commits July 29, 2026 11:57
Two paths could finish green without producing a proposal PR:

octo-sts failing on a protected branch silently degraded to the
unsigned test-run path. Test mode is now gated on the ref being
unprotected, and a token failure on a protected ref fails fast, before
checkout and the multi-minute prepare step.
gh pr create failing was logged and swallowed. It now emits an
::error:: naming both recovery paths and exits non-zero; the tolerated
"a PR may already exist" case cannot happen now that the run fails when
the proposal branch pre-exists.
Also:

serialize runs with a concurrency group, so a main proposal and a
hotfix proposal cannot resolve versions and push branches at once
rename the toolchain pin to RUST_VERSION and record why it sits above
the crate's rust-version (cargo-release 1.1.2 needs >= 1.91), dropping
the unpinned dtolnay/rust-toolchain@stable action
install nightly explicitly with --profile minimal, rather than letting
rustup auto-download a full nightly inside the prepare step when
prepare-release.sh shells out to cargo +nightly for the rustdoc check
stage with git add -A so a file the prepare step creates is committed
instead of silently dropped, and log the staged diffstat
anchor the ref claim in the self.write.pr STS policy
fix a run-on sentence in docs/releasing.md and document the
protected-branch token failure there
commit-headless treats head-sha as the expected tip of an existing branch
unless create-branch is set. The step before it guarantees the proposal
branch does not exist, so the push asserted a tip that cannot exist: the
signed path failed on every real run, and only the unsigned test path,
which bypassed the action entirely, ever worked.

Drop that test path along with the octo-sts continue-on-error fallback.
The token is required to push a verified commit and open the PR, so a run
that cannot mint one now fails at the first step rather than producing an
unsigned branch and no PR. Both the push and the PR step lose their
conditionals, leaving a single unconditional path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
commit-headless treats head-sha as the expected tip of an existing branch
unless create-branch is set. The step before it guarantees the proposal
branch does not exist, so the push asserted a tip that cannot exist: the
signed path failed on every real run, and only the unsigned test path,
which bypassed the action entirely, ever worked.

Drop that test path along with the octo-sts continue-on-error fallback.
The token is required to push a verified commit and open the PR, so a run
that cannot mint one now fails at the first step rather than producing an
unsigned branch and no PR. Both the push and the PR step lose their
conditionals, leaving a single unconditional path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@iunanua

iunanua commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 886ad6c9f4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/releasing.md
Comment thread .github/workflows/release-proposal-dispatch.yaml
@iunanua
iunanua marked this pull request as ready for review July 29, 2026 13:21
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.

1 participant