This repository uses Changesets to manage versioning and publishing of packages. This guide explains how to create releases for builder and tools packages.
- Twist Creator (
@plotday/twister): Independent versioning - Tools (
@plotday/tool-*): Independent versioning - Twists (
@plotday/twist-*): Not published, excluded from releases
Each package maintains its own version and can be released independently.
When you make changes to the builder or any tools package, you need to add a changeset before merging your PR.
pnpm changesetThis will prompt you with:
-
Which packages would you like to include?
- Select the packages you've modified (use space to select, enter to confirm)
- Only builder and tools packages can be selected (twists are excluded)
-
What kind of change is this?
major: Breaking changes (e.g., removing or changing public APIs)minor: New features (backward compatible)patch: Bug fixes and minor improvements
-
Summary of changes
- Write a clear description of what changed
- This will appear in the CHANGELOG
- Use imperative mood (e.g., "Add new feature" not "Added new feature")
git add .changeset/*.md
git commit -m "Add changeset for [brief description]"The changeset file will be created in .changeset/ with a random name like .changeset/brave-lions-dance.md.
-
Developer makes changes
- Make your changes to builder or tools packages
- Run
pnpm changesetto add a changeset - Commit the changeset file along with your changes
- Open a PR to
main
-
PR validation
- GitHub Actions will check if builder/tools were modified
- If modified, it ensures a changeset file exists
- PR cannot be merged without a changeset (or admin override)
-
After PR merge to main
- GitHub Actions automatically runs the release workflow
- Creates or updates a "Version Packages" PR
- This PR:
- Bumps versions in
package.jsonfiles - Updates
CHANGELOG.mdfiles - Removes consumed changeset files
- Bumps versions in
-
Publishing
- When the "Version Packages" PR is merged
- GitHub Actions automatically:
- Builds all packages
- Publishes changed packages to npm
- Creates GitHub releases with changelogs
- Tags each release (e.g.,
twister@0.9.1,tool-google-calendar@0.1.0)
When packages are published, GitHub releases are automatically created with the following details:
Each package gets its own tag based on its directory structure:
- Twist Creator:
twister@0.9.1 - Tools:
tool-google-calendar@0.1.0,tool-outlook-calendar@0.1.0, etc.
This tagging convention allows you to:
- Track releases for each package independently
- Easily identify which package a release belongs to
- Clone or checkout specific package versions
Each GitHub release includes:
- Title: Package name and version (e.g.,
@plotday/twister@0.9.1) - Release Notes: Automatically extracted from the package's CHANGELOG.md for that version
- Assets: None (packages are distributed via npm)
View all releases at: https://github.com/plotday/plot/releases
Or filter by package:
- Builder releases: Search for tags starting with
twister@ - Tool releases: Search for tags starting with
tool-
If you need to create a GitHub release manually after publishing:
# For Twist Creator
gh release create twister@0.9.1 --title "@plotday/twister@0.9.1" --notes "Release notes here"
# For a tool
gh release create tool-google-calendar@0.1.0 --title "@plotday/tool-google-calendar@0.1.0" --notes "Release notes here"Good examples:
- Fix calendar sync race condition causing duplicate events
- Add support for recurring events in Google Calendar integration
- BREAKING: Remove deprecated `createTwist()` function
Bad examples:
- Fixed bug
- Updates
- Changed some code
Major (Breaking Changes)
- Removing public APIs
- Changing function signatures
- Changing behavior in backward-incompatible ways
Minor (New Features)
- Adding new functions or methods
- Adding new optional parameters
- New capabilities that don't break existing code
Patch (Bug Fixes & Improvements)
- Fixing bugs
- Performance improvements
- Documentation updates
- Refactoring without API changes
You can create multiple changesets for a single PR if:
- Changes affect multiple packages independently
- Different changes have different version bump types
- You want to separate concerns in the changelog
Just run pnpm changeset multiple times.
If you need to manually publish a package:
# 1. Update versions and changelogs
pnpm version-packages
# 2. Review the changes
git diff
# 3. Commit version changes
git add .
git commit -m "chore: version packages"
git push
# 4. Build and publish
pnpm release
# 5. (Optional) Create GitHub release manually
gh release create twister@0.9.1 --title "@plotday/twister@0.9.1" --notes "Release notes"Solution: Run pnpm changeset and commit the generated file.
Problem: You modified a twist package. Solution: Twists are excluded from releases. No changeset needed for twist-only changes.
Solution: Merge main into the Version Packages PR branch to resolve conflicts.
Possible causes:
- NPM_TOKEN is invalid or expired → Regenerate and update in GitHub secrets
- Version already exists on npm → Check if package was already published
- Build failed → Check build logs in GitHub Actions
Possible causes:
- Tag already exists → Release may have been created previously
- GITHUB_TOKEN lacks permissions → Check repository settings
- Invalid tag name → Verify package directory structure matches expectation
Solution: Check the GitHub Actions logs for the specific error. You can manually create the release using the gh CLI if needed.