Prompt file imported from ing17romc/edt-lib (
.codex/prompts/save-repository-patch.prompt.md). Copyright stays with the author.
Perform the following steps automatically:
- Inspect current release state: Check
git status,git log --decorate -5, andnpm pkg get versionbefore changing anything. If a previous attempt already created a version bump commit or tag (for examplevX.Y.Z), resume from that version instead of bumping again. - Initial Commit and Push: Save all intended code changes made so far and push them before starting the release flow. Do not stage
.codex/unless explicitly requested. - Create or resume the patch version:
- If no release bump exists yet, run
npm version patch. - If the repo is already bumped from an interrupted publish, reuse the existing version and do not run
npm version patchagain.
- If no release bump exists yet, run
- Build before publish: Run
npm run build. - Manual publish handoff: Do not run
npm publish --access publicyourself. Instead, tell the user to runnpm publish --access publicmanually in their own console.- Pause after giving the command and wait for the user to confirm the publish completed, or to share the exact failure output.
- If the user reports browser auth, 2FA, or another npm publish issue, help them resolve it, but do not execute the publish command on their behalf.
- If the user confirms the version was published successfully, or npm reports that the target version already exists, continue the workflow without creating a new version bump.
- Publish Storybook: Deploy the latest version of Storybook by running
npm run release-sb. - Update Changelog: Document the released changes in
CHANGELOG.md. The version and date must match the released version inpackage.json. - Commit and Push release metadata: Commit the changelog updates, push
main, and push the release tag created bynpm version.
