Skip to content

Configuration

Simple Release is configured with a single file in the repository root. The config describes your project type and default options for the release steps.

The first file found is used, searched in this order:

FileFormat
.simple-release.jsES module
.simple-release.mjsES module
.simple-release.cjsCommonJS module
.simple-release.jsonJSON

The JSON config describes addons with queries — strings that name the package to load:

.simple-release.json
{
"project": ["@simple-release/pnpm#PnpmWorkspacesProject", {
"mode": "fixed"
}]
}

The JS config can do the same, or instantiate addons directly — useful when you already have the packages installed:

.simple-release.js
import { PnpmWorkspacesProject } from '@simple-release/pnpm'
export const project = new PnpmWorkspacesProject({
mode: 'fixed'
})

A query names the class to load in the format package[@version][#Export]:

QueryMeaning
@simple-release/pnpm#PnpmProjectThe PnpmProject export of the latest @simple-release/pnpm
@simple-release/pnpm@3.2.1#PnpmWorkspacesProjectThe same package pinned to version 3.2.1
@simple-release/pnpmThe default export of the package

To pass options to the class constructor, use a tuple of the query and an options object:

["@simple-release/pnpm#PnpmWorkspacesProject", { "mode": "independent" }]

Top-level keys of the config:

KeyDescription
projectThe project addon query or instance. Describes how to read the version, bump, and publish.
hostingThe hosting addon, e.g. @simple-release/github#GithubHosting. Creates releases and pull requests. The GitHub Action provides it automatically.
releaserOptions for the releaser itself: verbose, silent, dryRun.

Every other key sets default options for the corresponding release step: checkout, setUser, bump, commit, maintenanceBranch, tag, push, publish, release, and pullRequest. See the Releaser page for the options of each step.

A fuller example:

.simple-release.json
{
"project": ["@simple-release/pnpm#PnpmWorkspacesProject", {
"mode": "fixed"
}],
"releaser": {
"verbose": true
},
"bump": {
"extraScopes": ["deps"]
},
"maintenanceBranch": {
"enabled": true
}
}

This config releases a fixed-mode pnpm workspaces monorepo, logs verbosely, counts fix(deps): ... commits from Dependabot or Renovate towards version bumps, and creates a maintenance branch when a release crosses a major version boundary.