Prompt file imported from zafnz/simgadget (
.cursor/commands/create-release.md). Copyright stays with the author.
Create GitHub Release from Changes Since Last Tag
Create a GitHub release based on commits since the previous tag. Generate release notes, create the release using the GitHub CLI, and verify the post-release workflow status.
Gather Information
- Get the new version from
packages/simgadget/package.jsonversion key — both packages publish in lockstep at the same version, and the workspace root is private and carries none - Get the previous tag using
git describe --tags --abbrev=0 - Get the target commit SHA using
git rev-parse HEAD
Steps
-
Get Git Diff: Look at all the changes between the previous tag and HEAD:
git --no-pager diff <PREVIOUS_REF> -
Format Release Notes: Take the raw git diff and format it into Markdown using this structure:
# SimGadget <NEW_VERSION> ## Features - **Feature Name:** Description... ## Improvements - **Improvement Name:** Description... ## Documentation - **Doc Update:** Description... ## Build - **Version Bump:** Updated the project version to <NEW_VERSION>. -
Create Temporary Notes File: Save the formatted markdown notes into
TEMP.md. This avoids shell quoting/escaping issues.⚠️ STOP and ask for review before proceeding. Creating a release will trigger a GitHub action that is too fast to cancel if triggered by mistake.
-
Create GitHub Release: Use the
ghCLI to create the release:gh release create <NEW_VERSION> --target <TARGET_SHA> --title "<RELEASE_TITLE>" --notes-file TEMP.md --latestFor the title, use format:
<NEW_VERSION> - <SUMMARY>where summary is the most significant change in 5 words or less. Consider adding an emoji at the end if it matches well. -
Clean Up: Remove the temporary notes file:
rm TEMP.md -
Verify Workflow Status: Check the status of the workflow run triggered by the release:
gh run list --limit 1 --json name,status,conclusion,event,url --jq '.[0]' | catThe
conclusionfield should besuccess.
