镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

ci(release): run the release job in the release environment - #205

Merged
rtorcato-bot merged 2 commits into
mainfrom
ci/release-environment
Oct 12, 2026
Merged

rtorcato-bot merged 2 commits into
mainfrom
ci/release-environment

Conversation

@rtorcato-bot

Copy link
Copy Markdown
Collaborator

🤖 Automated — @Woz 🐝 (Buzz agent) via ai-loop.

Follow-up to #192. Approved by rtorcato and dispatched by Optimus Prime in Buzz.

What changed

  • Adds environment: release to the release job in .github/workflows/release.yml.
  • Leaves id-token: write and the other permissions as they are.
  • Updates the two comments that said there was no release environment yet: the concurrency block and the default-branch if guard. The guard itself stays, and the environment's required-reviewer gate now sits on top of it.

Why

The npm trusted publishers for @rtorcato/react-common and @rtorcato/shadcn-ui expect workflow release.yml plus environment release. Without this line the OIDC token carries no environment claim, so it doesn't match the trusted publisher, and the next publish fails with E404.

Megatron is creating the release environment, with rtorcato as required reviewer. Merge this once that environment exists. Until then, a run would create the environment automatically, without the reviewer gate.

Verification

  • Workflow validated with @action-validator/cli. The YAML parses.
  • repo-tooling doctor shows no new findings. Its three drift items (Node version, repo security settings, milestones) were there before this change.
  • No package code changed, so there's no changeset.

For reviewers

  • This is a one-line behavioural change to the release job. Releases will now pause for approval in the release environment.

npm trusted publishing for @rtorcato/react-common and @rtorcato/shadcn-ui
is bound to release.yml + environment `release`. Without the
environment the OIDC publish fails with E404. Update the comments that
said the environment did not exist yet.
@rtorcato-bot rtorcato-bot added the ai-review PR awaiting agent review label Oct 8, 2026
@rtorcato-bot rtorcato-bot self-assigned this Oct 8, 2026
@rtorcato-bot

Copy link
Copy Markdown
Collaborator Author

🤖 Automated — @Woz 🐝 (Buzz agent) via ai-loop. Opened with ai-review. Handing off to @Stinger for code review and @Warden for security review.

@rtorcato-bot rtorcato-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 Automated review — @Stinger 🐝 (Buzz agent) via ai-loop.

One-line environment: release on the release job matches the npm trusted publisher (workflow + environment). The if guard stays, id-token: write is intact, and the reworded comments are accurate.

Transition: adding ai-ok-code. Security review is next, with @Warden.

Before merging

  • The release environment doesn't exist yet. Only github-pages is there right now. Merging first means the next run auto-creates it with no reviewer gate.
  • CI is still running.

@rtorcato-bot rtorcato-bot added the ai-ok-code code-reviewer passed label Oct 8, 2026

@rtorcato-bot rtorcato-bot left a comment •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 Automated security review — @Warden 🐝 (Buzz agent) via ai-loop.

PASS-NOTES. One-line environment: release on the release job; permissions unchanged, no new inputs, actions or secrets. It tightens the OIDC claim npm checks. But gh api …/environments shows no release environment yet: merged now, the next run auto-creates it unprotected and publishes ungated. Adding ai-ok-sec + ai-notes; next: @Stinger / @Megatron.

Before merging

  • Create release env with rtorcato as required reviewer.
  • Set its deployment branches to main only.
  • Pinning changesets/action is tracked in #198.

@rtorcato-bot rtorcato-bot added ai-ok-sec security-expert passed ai-notes Passed, but a reviewer left something to read before merging labels Oct 8, 2026
@rtorcato-bot

Copy link
Copy Markdown
Collaborator Author

🤖 Automated — @Woz 🐝 (Buzz agent) via ai-loop.

Both reviews passed (ai-ok-code, ai-ok-sec) and CI is green, but I'm holding off on merge-ready. The release environment doesn't exist yet: gh api repos/rtorcato/react-common/environments returns only github-pages. If this merged now, the next release run would create release automatically with no protection and publish without the approval gate.

@Megatron needs to create release first, with rtorcato as the required reviewer and deployments limited to main. Once it exists, I'll swap ai-review for merge-ready and hand the PR to @Megatron.

rtorcato-bot added a commit that referenced this pull request Oct 8, 2026
🤖 *Automated — `@Woz` 🐝 (Buzz agent) via ai-loop.*

Closes #200. This is the same fix as rtorcato/js-common#360.

## What changed
- `.github/workflows/ci.yml`: `pnpm --filter @rtorcato/shadcn-ui
bundle-size` now runs as the last step of the `build` job, after `pnpm
build`. The separate `bundle-size` job is deleted. That saves one
checkout, setup, install and build on every PR.
- `packages/shadcn-ui/CONTRIBUTING.md`: the CI-gates row now says
`bundle-size` is a step inside `build`.

## Required-check safety
`bundle-size` is **not** a required check. Branch protection on `main`
requires `lint`, `typecheck`, `test` and `build` (from `gh api
repos/rtorcato/react-common/branches/main`). The only ruleset is
`code-scanning-main`, which has no status-check rule. Nothing has
`needs: bundle-size`.

Because the gate now runs inside `build`, a bundle-size regression fails
a required check, where before it only failed a non-required one.

## Verification
- Both `@action-validator/cli` and a YAML parse pass on `ci.yml`.
- Locally on this branch: `pnpm install --frozen-lockfile`, `pnpm
build`, then `pnpm --filter @rtorcato/shadcn-ui bundle-size` passed
("Bundle-size gate passed"). The pre-push `pnpm verify` also passed.
- The CI run on this PR should show one fewer job, with the gate in the
`build` log.

## For reviewers
- The rest of that CONTRIBUTING CI table is already out of date. It
still mentions semantic-release, storybook, knip and a test matrix. I
left it alone because it's out of scope; tell me if you want a follow-up
issue.
- Doesn't touch `release.yml`, so no collision with #197 or #205.

Co-authored-by: Woz (rtorcato-bot) <319595688+rtorcato-bot@users.noreply.github.com>
@rtorcato-bot

Copy link
Copy Markdown
Collaborator Author

🤖 Automated — @Woz 🐝 (Buzz agent) via ai-loop.

Still blocked, now labelled ai-blocked and handed to @rtorcato. Moving ai-review → ai-blocked. ai-ok-code, ai-ok-sec and ai-notes stay.

gh api repos/rtorcato/react-common/environments still returns only github-pages (checked 2026-10-11). Merging now would let the next release run auto-create release with no reviewers and publish without the approval gate.

Needed: create a release environment on rtorcato/react-common, with rtorcato as required reviewer and deployments limited to main (same setup as swift-common). After that I'll rebase onto main (the branch is behind), re-check reviews and CI on the new head, and hand it to @Megatron as merge-ready.

@rtorcato-bot rtorcato-bot added ai-blocked Agent gave up; needs a human and removed ai-review PR awaiting agent review labels Oct 11, 2026
rtorcato-bot added a commit that referenced this pull request Oct 11, 2026
🤖 *Automated — `@Nectar` 🐝 (Buzz agent) via ai-loop.*

Closes #198

## What changed
`release.yml`: `changesets/action@v2` →
`changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2`.
The trailing comment lets Dependabot (the `github-actions` ecosystem is
already configured) keep bumping it.

## SHA check
- **Heads up:** the SHA in the issue (`66d7d1dd…`) is the annotated
**tag object** for `v2.1.2`, not a commit, so `uses:` can't pin to it. I
dereferenced it with `gh api
repos/changesets/action/git/tags/66d7d1dd…`, which gives commit
`ae32849d5ba541f9ae29e40e22a623bc13562f51`.
- `gh api repos/changesets/action/commits/v2.1.2` returns the same
commit.
- `compare/v2.1.2...v2` is `identical`, so this pins exactly what `@v2`
runs today, with no behaviour change.

## Verification
- The YAML parses, and the step list is unchanged apart from the pinned
ref.
- `git merge-tree` against #205 (`ci/release-environment`, which also
edits `release.yml`) merges cleanly. The hunks don't overlap.

## Not done (optional in the issue, left for a follow-up if wanted)
- Pinning `pnpm/action-setup@v6` in the release job.
- Pinning `npm install -g npm@latest` to a version ≥ 11.5.1.

I was asked to pin `changesets/action` only.

Co-authored-by: Nectar (rtorcato-bot) <319595688+rtorcato-bot@users.noreply.github.com>
@rtorcato-bot

Copy link
Copy Markdown
Collaborator Author

🤖 Automated — @Woz 🐝 (Buzz agent) via ai-loop.

Unblocked. Moving ai-blocked → merge-ready. Handing off to @Megatron to merge.

  • The release environment exists (checked live): required_reviewers = rtorcato, deployment branches = main only. That covers both reviewers' "before merging" notes.
  • I updated the branch from main with a merge commit, not a rebase, so there was no force-push. Head is now f3fc0d8, and the PR diff is byte-identical to the reviewed f57dfd0 (one file, .github/workflows/release.yml).
  • CI is green on f3fc0d8. Merge state is CLEAN.
  • ai-ok-code, ai-ok-sec and ai-notes stay as they are. This is release config, and per #releases it still needs rtorcato's go before merging. Don't trigger a release.

@rtorcato-bot rtorcato-bot added merge-ready Both agent reviews passed and the PR is mergeable — waiting on a human and removed ai-blocked Agent gave up; needs a human labels Oct 12, 2026
@rtorcato-bot

Copy link
Copy Markdown
Collaborator Author

🤖 Automated — @Megatron 🐝 (Buzz agent) via ai-loop.

Dropping ai-notes and merging. Both reviewers' notes asked for the release environment to exist first. I checked it live: required_reviewers = rtorcato, deployment branches = main only. rtorcato gave his go in #releases ("yes to both", and the approved plan names this follow-up PR). Head f3fc0d8 is CLEAN, all checks green, and the diff is only .github/workflows/release.yml. The ci(release): subject cuts no release, and I'm not dispatching one.

@rtorcato-bot rtorcato-bot removed the ai-notes Passed, but a reviewer left something to read before merging label Oct 12, 2026
@rtorcato-bot
rtorcato-bot merged commit b997660 into main Oct 12, 2026
11 checks passed
@rtorcato-bot
rtorcato-bot deleted the ci/release-environment branch October 12, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-ok-code code-reviewer passed ai-ok-sec security-expert passed merge-ready Both agent reviews passed and the PR is mergeable — waiting on a human

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants