Release Automation
The main flow keeps a release pull request up to date and releases it on merge:
- You push commits to the main branch.
- The action computes the next version from the Conventional Commits history and creates (or updates) a pull request with the version bump and changelog.
- You squash-merge the pull request — the action tags the release commit, publishes the packages, and creates the GitHub release.
-
Create a config describing your project in the repository root:
.simple-release.json {"project": ["@simple-release/pnpm#PnpmWorkspacesProject", {"mode": "fixed"}]}The action installs the addon named in the query by itself — no dependencies to add to your project.
-
Create the release workflow:
.github/workflows/release.yml name: Releaseon:issue_comment:types: [created, deleted]push:branches:- mainjobs:check:runs-on: ubuntu-latestname: Context checkpermissions:contents: readoutputs:continue: ${{ steps.check.outputs.continue }}workflow: ${{ steps.check.outputs.workflow }}steps:- name: Checkout the repositoryuses: actions/checkout@v7- name: Context checkid: checkuses: TrigenSoftware/simple-release-action@v2with:workflow: checkgithub-token: ${{ secrets.GITHUB_TOKEN }}pull-request:runs-on: ubuntu-latestname: Pull requestneeds: checkif: needs.check.outputs.workflow == 'pull-request'permissions:contents: writepull-requests: writesteps:- name: Checkout the repositoryuses: actions/checkout@v7- name: Create or update pull requestuses: TrigenSoftware/simple-release-action@v2with:workflow: pull-requestgithub-token: ${{ secrets.GITHUB_TOKEN }}release:runs-on: ubuntu-latestname: Releaseneeds: checkif: needs.check.outputs.workflow == 'release'permissions:contents: writesteps:- name: Checkout the repositoryuses: actions/checkout@v7- name: Install pnpmuses: pnpm/action-setup@v6with:version: 11- name: Install Node.jsuses: actions/setup-node@v6with:node-version: 22cache: 'pnpm'registry-url: 'https://registry.npmjs.org'- name: Install dependenciesrun: pnpm install- name: Releaseuses: TrigenSoftware/simple-release-action@v2with:workflow: releasegithub-token: ${{ secrets.GITHUB_TOKEN }}npm-token: ${{ secrets.NPM_TOKEN }}The three jobs map to the action workflows:
checkdecides what should run for the current event,pull-requestmaintains the release pull request, andreleaseruns on the merged release commit — it creates the tags, publishes the packages, and creates the GitHub release. -
Allow the action to create pull requests: in the repository Settings → Actions → General, enable Allow GitHub Actions to create and approve pull requests. Without it the
pull-requestjob fails with a “GitHub Actions is not permitted to create or approve pull requests” error. -
Push a
feat: ...orfix: ...commit tomain— the release pull request appears. Merge it with squash to release.
The first release
Section titled “The first release”No special setup is needed for a new project: when no release tags exist yet, the action treats the current manifest version as the first release — the pull request keeps the version from the manifest and generates the changelog from the whole history.
Options via pull request comments
Section titled “Options via pull request comments”The pending release can be reshaped right from the release pull request: post a comment starting with !simple-release/set-options followed by a JSON block with releaser options. This is why the workflow subscribes to the issue_comment event — the action re-runs and regenerates the pull request with the options applied. Deleting the comment re-runs it again without them.
For example, to turn the pending release into a major:
!simple-release/set-options
```json{ "bump": { "as": "major" }}```A pull request that proposed 1.2.0 will be rebuilt as 2.0.0. The JSON accepts the same step options as the config file, and the comment options win over the config. Note that comments affect the pull request generation — so the options that matter here are the ones shaping it, bump first of all; options of the release-time steps like publish belong in the config. The body of every release pull request includes a cheatsheet with this command.
To force a version or release type without leaving the terminal, there is also a workflow dispatch form — see Manual Release.