Creating Releases
Propel your project forward by creating new releases with ease. The workspace-helper CLI provides a robust, interactive release workflow that handles versioning, changelogs, and Git operations.
Features
- Interactive Workflow: Step-by-step guidance for creating a release.
- Resumable Releases: Pause simply by cancelling an operation and resume later without losing your release notes.
- Automated Changelog: Generates release notes and appends them to
CHANGELOG.md. - Git Integration: Automatically tags, commits, and pushes changes.
- GitHub Releases: Uses the GitHub CLI (
gh) to create a release on GitHub.
Prerequisites
- GitHub CLI: Ensure
ghis installed and authenticated for GitHub Release creation. - Git: Git must be initialized in your repository.
Usage
To start the release process, run the tool and select "Create new release" (or use the alias if configured).
bash
wh
# Select "Create new release" from the menuThe Release Workflow
- Version Selection: The tool suggests the next patch version based on your current
package.jsonversion. You can accept it or enter a custom version (semver compliant). - Drafting Notes: Temporary files are created in
.release-temp/:<version>.md: For the GitHub Release body.<version>-changelog.md: For theCHANGELOG.mdentry.- Edit these files in your editor to add feature details and fixes.
- Confirmation: The tool pauses to let you edit the notes. Confirm when ready.
- Changelog Update: You'll be asked if you want to update
CHANGELOG.md. If yes, the content from<version>-changelog.mdis prepended to your changelog. - Finalize: The tool asks to proceed with git operations.
- Updates
package.jsonversion in all workspaces. - Commits changes (
chore(release): v<version>). - Tags the commit (
v<version>). - Pushes commit and tag to remote.
- Creates a GitHub Release using the notes from
<version>.md.
- Updates
Resuming a Release
If you interrupt the process (e.g., to check something in the code), the temporary files in .release-temp/ are preserved.
When you run the tool again:
- Select "Resume pending release".
- The tool detects the pending version and picks up where you left off.
Listing Releases
You can also view a list of all existing tags/releases:
- Run the tool.
- Select "List all releases".