Important
This is the development branch for changesets/action v2 compatible with Changesets v3. For the v1 code compatible with Changesets v2, check out the maintenance/v1 branch.
This repo contains a collection of GitHub Actions for Changesets. Check out the Automating Changesets guide to learn how to use these actions to automate your workflow.
- changesets/action: (This README. See below for details.)
- changesets/action/select-mode: Select the mode to run a Changesets workflow.
- changesets/action/version: Version packages and create or update a pull request with the changes.
- changesets/action/pack: Pack publishable packages into tarballs.
- changesets/action/publish: Publish packages to npm.
- changesets/action/pr-status: Generate changeset status in PRs.
- changesets/action/pr-comment: Create or update comments on PRs.
This action handles versioning and publishing of packages. It's the equivalent of setting up the changesets/action/select-mode, changesets/action/version, and changesets/action/publish actions in a workflow, but with the required permissions combined.
If using trusted publishing, it's recommended to set up the individual sub-actions instead to tighten publish permissions.
- Needs repo checked out and
@changesets/cliinstalled - Job permissions:
contents: write: to commit version changespull-requests: write: to create pull requestid-token: write: if using trusted publishing
- Workflow triggers: any
Note
In your repository settings, in Actions > General, also ensure the Allow GitHub Actions to create and approve pull requests option is enabled
Tip
Check out the docs to learn how to set up the version and publish workflow.
Important
To use a custom GitHub token, pass it explicitly through the github-token input:
with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}Setting the GITHUB_TOKEN environment variable does not configure the action. This applies whether release changes are pushed using the GitHub API or the Git CLI.
