changesets/action

1,068

stars

261

commits

TypeScript

primary language

Sep 4, 2026

updated

changesets.dev

README

Changesets GitHub Action

[!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 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.

Requirements

[!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.

[!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.

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.
publish-scriptThe command to use to build and publish packages
version-scriptThe command to update version, edit CHANGELOG, read and delete changesets. Default to changeset version if not provided
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.
create-github-releasesWhether to create Github releases after publish
push-git-tagsWhether to create git tags after publish. If create-github-releases is set to true, this option will also always be true.
push-with-git-cliWhether to use the Git CLI instead of the GitHub API to push release commits and tags. Defaults to false. When using the GitHub API, commits and tags are signed using GitHub's GPG key and attributed to the user or app that owns the github-token.
cwdThe working directory to execute Changesets in. Defaults to the root of the repository.
OutputsDescription
publishedA "true" or "false" string value to indicate whether a publishing is happened or not
published-packagesA JSON array to present the published packages. The format is [{"name": "@xx/xx", "version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]
has-changesetsA "true" or "false" string value about whether there were changesets. Useful if you want to create your own publishing functionality.
pr-numberThe pull request number that was created or updated

Contributors

(top 30 of 53)

Andarist

84 commits

emmatown

45 commits

bluwy

31 commits

changesets/action

1,068

stars

261

commits

TypeScript

primary language

Sep 4, 2026

updated

changesets.dev

README

Changesets GitHub Action

[!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 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.

Requirements

[!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.

[!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.

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.
publish-scriptThe command to use to build and publish packages
version-scriptThe command to update version, edit CHANGELOG, read and delete changesets. Default to changeset version if not provided
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.
create-github-releasesWhether to create Github releases after publish
push-git-tagsWhether to create git tags after publish. If create-github-releases is set to true, this option will also always be true.
push-with-git-cliWhether to use the Git CLI instead of the GitHub API to push release commits and tags. Defaults to false. When using the GitHub API, commits and tags are signed using GitHub's GPG key and attributed to the user or app that owns the github-token.
cwdThe working directory to execute Changesets in. Defaults to the root of the repository.
OutputsDescription
publishedA "true" or "false" string value to indicate whether a publishing is happened or not
published-packagesA JSON array to present the published packages. The format is [{"name": "@xx/xx", "version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]
has-changesetsA "true" or "false" string value about whether there were changesets. Useful if you want to create your own publishing functionality.
pr-numberThe pull request number that was created or updated

Contributors

(top 30 of 53)

Andarist

84 commits

emmatown

45 commits

bluwy

31 commits

Languages

TypeScript

99.5%