一键导入
release
// Run the Harnss release workflow — review staged diff, bump version, commit, tag, push, and create a GitHub release. Use when releasing, bumping version, tagging, or creating a release. Argument: major, minor, or patch.
// Run the Harnss release workflow — review staged diff, bump version, commit, tag, push, and create a GitHub release. Use when releasing, bumping version, tagging, or creating a release. Argument: major, minor, or patch.
| name | release |
| description | Run the Harnss release workflow — review staged diff, bump version, commit, tag, push, and create a GitHub release. Use when releasing, bumping version, tagging, or creating a release. Argument: major, minor, or patch. |
Run the full release pipeline. Bump type is passed as $ARGUMENTS (major, minor, or patch).
Run these commands and read every line of output:
git status
git diff --cached --stat
git diff --cached
If the diff is too large to read in one shot, read it in chunks (e.g., per-directory or line ranges). You must read the entire diff before proceeding.
Review for:
test-*.ts, scratch.*, *.tmp, random-*.md).env, credentials, large binaries)If you find any:
If there are no staged changes but unstaged changes exist, ask the user if they want to stage anything first. If the working tree is completely clean (nothing to release), tell the user and stop.
package.json (the "version" field)git tag --sort=-v:refname | head -1MAJOR.MINOR.PATCH$ARGUMENTS:
major → (MAJOR+1).0.0minor → MAJOR.(MINOR+1).0patch → MAJOR.MINOR.(PATCH+1)$ARGUMENTS is empty or invalid, ask the user which bump type they wantnpm view @anthropic-ai/claude-agent-sdk version
Compare with the version in package.json under dependencies["@anthropic-ai/claude-agent-sdk"] (strip the ^ prefix for comparison). If a newer version exists, update the dependency version (keep the ^ prefix) and tell the user.
package.json to set the new version numbergit add package.jsonpnpm install
git add package.json pnpm-lock.yaml
Choose the commit message based on what's staged:
feat: short summary (2-4 key themes)
- Change description 1
- Change description 2
- ...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use fix: instead of feat: if all changes are bug fixes.
chore: bump version to X.Y.Z
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
If the SDK was also updated:
chore: bump version to X.Y.Z and update claude-agent-sdk to A.B.C
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
git commit -m "$(cat <<'EOF'
<message here>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EOF
)"
git tag vX.Y.Z HEAD
git push origin master && git push origin vX.Y.Z
If push fails, report the error and stop.
Get the previous release tag:
git tag --sort=-v:refname | head -2 | tail -1
Read the full diff and commit log since the previous release:
git log v{prev}...HEAD --oneline
git diff v{prev}...HEAD --stat
git diff v{prev}...HEAD
Read ALL of this output. For the full diff, read it in chunks if needed — every line matters for writing accurate release notes.
Load the template from references/release-notes-template.md and follow its format exactly.
gh release create vX.Y.Z --title "vX.Y.Z — Short Descriptive Phrase" --notes "$(cat <<'EOF'
<release notes>
EOF
)"
The title uses an em dash (—), not a hyphen.
Output the release URL when done so the user can verify.
Co-Authored-By trailer is mandatory on every commit.https://github.com/OpenSource03/harnssmasterhttps://github.com/OpenSource03/harnss/compare/v{prev}...v{current}pnpm (never use npm or yarn for installs)