mit einem Klick
canary
// Triggers a canary release for a Storybook PR. Use when the user wants to publish a canary version, create a pre-release, or test a PR via npm.
// Triggers a canary release for a Storybook PR. Use when the user wants to publish a canary version, create a pre-release, or test a PR via npm.
Write the changelog entry for a new minor or major Storybook release. Use when preparing a CHANGELOG.md entry for a X.Y.0 version.
Review, improve, rewrite, author, or plan Storybook documentation in /docs. Use this when asked to review docs, improve a page, rewrite documentation, draft new docs, or advise on docs strategy.
Checks out a PR (including fork PRs), fixes all linting and TypeScript errors, then pushes the changes back. Use when asked to fix lint, types, or TS errors on a PR.
Creates a pull request following Storybook conventions. Use when creating PRs, opening pull requests, or submitting changes for review.
Upgrade Storybook to a specific version (canary or release). Use this when upgrading Storybook packages in an external app, reproduction, or test project.
Label GitHub issues and PRs found during QA testing. Use when organizing QA findings with proper labels.
| name | canary |
| description | Triggers a canary release for a Storybook PR. Use when the user wants to publish a canary version, create a pre-release, or test a PR via npm. |
| allowed-tools | Bash |
Publishes a canary version of Storybook from a PR to npm.
To trigger a canary release, run:
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>
0.0.0-pr-<PR_NUMBER>-sha-<SHORT_SHA>canary tagThe canary version follows a predictable structure:
0.0.0-pr-<PR_NUMBER>-sha-<SHORT_SHA>
<PR_NUMBER>: The PR number (e.g., 33526)<SHORT_SHA>: First 8 characters of the commit SHA (e.g., a2e09fa2)Example: For PR #33526 with commit a2e09fa284a..., the canary version is:
0.0.0-pr-33526-sha-a2e09fa2
You can construct the version yourself if you know the PR number and the latest commit SHA on that PR.
Check the PR body for the published version. It will show something like:
This pull request has been released as version
0.0.0-pr-33365-sha-b6656566
Then test with:
npx storybook@<VERSION_FROM_PR> sandbox
Or upgrade an existing project:
npx storybook@<VERSION_FROM_PR> upgrade
gh CLI authenticatedWatch the workflow run at: https://github.com/storybookjs/storybook/actions/workflows/publish.yml