changesets/action/version

August 3, 2026 ยท View on GitHub

This action versions packages and creates or updates a pull request with the changes.

Requirements

  • Needs repo checked out and @changesets/cli installed
  • Job permissions:
    • contents: write: to commit version changes
    • pull-requests: write: to create pull request
  • 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

Usage

Tip

Check out the docs to learn how to set up the version and publish workflow.

API

InputsDescription
github-tokenThe GitHub token to use for authentication. Defaults to the GitHub-provided token. To use a custom token, pass it explicitly to this input.
scriptThe command to use to version packages
commit-messageThe commit message. Default to Version Packages
pr-titleThe pull request title. Default to Version Packages
pr-draftControls draft PR behavior. Use 'create' to create new version PRs as draft, or 'always' to also convert existing version PRs back to draft when updating them.
pr-base-branchSets the base branch of the PR. Defaults to github.ref_name.
push-with-git-cliWhether to use the Git CLI instead of the GitHub API to push release commits. Defaults to false. When using the GitHub API, commits are signed using GitHub's GPG key and attributed to the user or app that owns the github-token.
OutputsDescription
pr-numberThe pull request number that was created or updated