Changesets are a third-party npm package and therefore only available to Platform CLI integrations.
Benefits of Automation
Automating your versioning and deployment workflow provides several advantages:- Consistency: Version bumps follow semantic versioning rules automatically
- Speed: Deploy snapshot versions for testing without manual intervention
- LLM Integration: Changesets are easier for AI tools to work with, compared to manual version number bumps
- Reduced Errors: Eliminate mistakes from manual version number updates
- Team Collaboration: Multiple developers can work in parallel without worrying about conflicting version bumps
What are Changesets?
Changesets is a tool for managing versioning and changelogs in monorepos and single-package projects. Instead of manually editingpackage.json and CHANGELOG.md, developers create small markdown files that describe their changes and specify the version bump type (patch, minor, or major).
When you’re ready to release, changesets processes these files to:
- Bump version numbers in
package.json - Generate changelog entries
- Remove the processed changeset files
The Complete Workflow
This guide covers four automated jobs we recommend adding, and how they can work together.We recognize all codebases and CI flows are different. These are the jobs we’ve found most useful in our integration development, but feel free to pick and choose from these jobs per your workflow needs.
- Snapshot Deployment: Deploys labeled snapshot versions to Zapier for testing
- Integration Validation: Validates your integration code, configuration, and optional changelog format as you go
- Changeset Validation: Verifies changeset files are properly formatted and version numbers haven’t been manually changed
- Changeset Processing: Processes changesets to update versions and changelogs
Common Integration Patterns
Pattern 1: Continuous Snapshot Deployment
Deploy snapshot versions on every commit to a pull request for easy testing:- Snapshot deployment runs on every PR commit
- Uses branch name as the snapshot label
- Enables immediate testing of changes without waiting for version releases
Pattern 2: Pull Request Validation
Run validation jobs on pull requests to catch issues early:- Integration validation runs on any PR to verify code and configuration
- Changeset validation runs only when changeset files are added or modified
Pattern 3: Pre-Publication Processing
Process changesets before publishing:- Changeset processing runs before publishing your integration version (when changeset files exist)
- Updates version numbers and changelogs in preparation for release
Job 1: Snapshot Deployment
Purpose
Deploys labeled snapshot versions to Zapier using thezapier push --snapshot command. This enables testing specific branches or features without creating official version releases. Running this on every PR commit allows for continuous testing of changes.
What It Does
zapier push --snapshot LABEL command:
- Creates a version labeled
0.0.0-LABEL - Deploys this version to Zapier
- Enables testing without affecting production versions
zapier push --snapshot flag here.
When to Run
- On every commit to a pull request for continuous testing
- On feature branches for testing
- Manually triggered for specific branches
- Based on branch name patterns or labels
Job 2: Integration Validation
Purpose
Validates your integration code and configuration using thezapier validate command. This catches common issues with authentication, triggers, actions, and other integration components before deployment. Optionally, you can also validate that your CHANGELOG.md format is compatible with changesets.
What It Does
zapier validate command here.
When to Run
- On every pull request
- As part of your standard test suite
- Before processing any changesets
- Before publishing your integration version
Additional Considerations
If you’re using changesets, you may also want to validate that yourCHANGELOG.md format is compatible. Changesets expects the file to start with an H1 header (e.g., # App Name) that is not a version number.
Job 3: Changeset Validation
Purpose
Validates that changesets are properly formatted and ensures developers haven’t manually modified version numbers inpackage.json. This prevents double version bumps (one manual, one from changesets).
What It Does
npx changeset status command:
- Lists all pending changesets
- Shows which packages will be affected
- Validates changeset file format
- Does not fail if no changesets exist
When to Run
- On pull requests that add or modify changeset files
- Before publishing your integration version
- Use CI rules to only trigger when
.changeset/*.mdfiles change
Additional Considerations
- This job requires access to git history to compare versions
- Ensure the CI checkout isn’t in a detached HEAD state
Job 4: Changeset Processing
Purpose
Processes all pending changesets to update version numbers and changelogs before publishing your integration version. This prepares your integration for release by consolidating all pending changes.What It Does
npx changeset version command:
- Reads all pending changeset files
- Bumps version numbers in
package.jsonbased on changeset types - Updates
CHANGELOG.mdwith new entries - Deletes processed changeset files
When to Run
- Before publishing your integration version (when changesets exist)
- Manually triggered for release preparation
- As part of your release workflow
- Use CI rules to only trigger when
.changeset/*.mdfiles exist
Additional Considerations
- Run this job when you’re ready to prepare a new version for publication
- Review the updated version number and changelog entries before publishing
- You can run this locally or as part of a CI workflow
- After processing, use
zapier pushto publish the new version to Zapier
Setting Up Changesets
To use these workflows, follow the instructions in the Changesets Github repo to set up Changesets in your codebase.Creating a Changeset
Developers create changesets using:- Which packages are changing
- The version bump type (patch, minor, major)
- A description of the changes
.changeset/ with this information.
Example: Complete Workflow in Action
- Developer creates a feature branch and makes changes
- Developer pushes the branch and opens a pull request
- CI runs snapshot deployment on every commit, pushing version
0.0.0-LABELto Zapier - Team can immediately test the snapshot version as development continues
- Developer runs
npx changeset addand creates a changeset file describing the changes - CI runs integration validation and changeset validation on the PR
- After PR approval, changes are merged
- When ready to publish a new version, team runs changeset processing, which:
- Updates version in
package.json - Adds entry to
CHANGELOG.md - Deletes the changeset file
- Updates version in
- Team reviews the updated version and changelog, then uses
zapier pushto publish the version