TExcelTAD
Home › Release Engineering & CI/CD › The semantic-release Plugin Pipeline

The semantic-release Plugin Pipeline

semantic-release itself only orchestrates. Everything it does (analysing commits, writing notes, updating files, tagging, publishing) is a plugin implementing one or more lifecycle steps. Understanding the steps is the key to configuring it and to debugging a failed release.

The lifecycle

Step Runs Typical plugins If it fails
verifyConditions first, before anything else npm (token present?), github (token, repo access), git, changelog, exec nothing happened yet
analyzeCommits find the release type commit-analyzer
verifyRelease check the computed release exec (custom checks) nothing published
generateNotes build the notes release-notes-generator, exec
prepare change files for the release changelog (write CHANGELOG.md), npm (version in package.json), exec (build), git (commit those files)
(tag) semantic-release creates and pushes the tag itself
publish publish artifacts npm (registry), github (GitHub Release + assets), exec tag exists, release half-done
addChannel add an existing release to another channel (dist-tag) npm, github
success / fail notifications github (comments on issues/PRs, opens an issue on failure), exec

Plugins run in the order listed in plugins for each step. That order matters in prepare: the changelog and version must be written before the git plugin commits them.

A full release, offline

This configuration is a complete local pipeline: analyse, write notes, update CHANGELOG.md and package.json, build an artifact with a shell command, commit the changed files, tag and push to the bare remote:

bash · try it yourself
git init -q --bare remote.git
git clone -q remote.git app 2>/dev/null && cd app
cat > package.json <<'JSON'
{ "name": "app", "version": "0.0.0-development", "private": true }
JSON
cat > .releaserc.json <<'JSON'
{
  "branches": ["main"],
  "repositoryUrl": "file:///home/learner/remote.git",
  "plugins": [
    ["@semantic-release/commit-analyzer", { "preset": "conventionalcommits" }],
    ["@semantic-release/release-notes-generator",
      { "preset": "conventionalcommits", "linkCompare": false, "linkReferences": false }],
    ["@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" }],
    ["@semantic-release/npm", { "npmPublish": false }],
    ["@semantic-release/exec", {
      "prepareCmd": "mkdir -p dist && echo 'app ${nextRelease.version}' > dist/app-${nextRelease.version}.txt",
      "publishCmd": "cd dist && sha256sum app-${nextRelease.version}.txt > SHA256SUMS"
    }],
    ["@semantic-release/git", {
      "assets": ["CHANGELOG.md", "package.json"],
      "message": "chore(release): ${nextRelease.version}"
    }]
  ]
}
JSON
printf 'dist/\nnode_modules/\n' > .gitignore
git add -A && git commit -q -m "feat: initial app"
git push -q origin main
semantic-release --no-ci 2>&1 | sed -E 's/^\[[^]]+\] \[semantic-release\] //' | grep -v 'Loaded plugin'
echo "--- result"
git fetch -q origin
git log --format='%s%d'   # no hashes: the release commit's changelog holds today's date
git ls-remote --tags origin | cut -f2
cat CHANGELOG.md
grep version package.json
ls dist
› ℹ  Running semantic-release version 25.0.9
› ✔  Run automated release from branch main on repository file:///home/learner/remote.git
› ✔  Allowed to push to the Git repository
› ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
› ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
› ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
› ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
› ℹ  Start step "verifyConditions" of plugin "@semantic-release/exec"
› ✔  Completed step "verifyConditions" of plugin "@semantic-release/exec"
› ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
› ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
› ℹ  No git tag version found on branch main
› ℹ  No previous release found, retrieving all commits
› ℹ  Found 1 commits since last release
› ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat: initial app
[@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[@semantic-release/commit-analyzer] › ℹ  Analysis of 1 commits complete: minor release
› ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
› ℹ  Start step "analyzeCommits" of plugin "@semantic-release/exec"
› ✔  Completed step "analyzeCommits" of plugin "@semantic-release/exec"
› ℹ  There is no previous release, the next release version is 1.0.0
› ℹ  Start step "verifyRelease" of plugin "@semantic-release/exec"
› ✔  Completed step "verifyRelease" of plugin "@semantic-release/exec"
› ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
› ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
› ℹ  Start step "generateNotes" of plugin "@semantic-release/exec"
› ✔  Completed step "generateNotes" of plugin "@semantic-release/exec"
› ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[@semantic-release/changelog] › ℹ  Create /home/learner/app/CHANGELOG.md
› ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
› ℹ  Start step "prepare" of plugin "@semantic-release/npm"
[@semantic-release/npm] › ℹ  Write version 1.0.0 to package.json in /home/learner/app
v1.0.0
› ✔  Completed step "prepare" of plugin "@semantic-release/npm"
› ℹ  Start step "prepare" of plugin "@semantic-release/exec"
[@semantic-release/exec] › ℹ  Call script mkdir -p dist && echo 'app 1.0.0' > dist/app-1.0.0.txt
› ✔  Completed step "prepare" of plugin "@semantic-release/exec"
› ℹ  Start step "prepare" of plugin "@semantic-release/git"
[@semantic-release/git] › ℹ  Found 2 file(s) to commit
[@semantic-release/git] › ℹ  Prepared Git release: v1.0.0
› ✔  Completed step "prepare" of plugin "@semantic-release/git"
› ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
› ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
› ℹ  Start step "generateNotes" of plugin "@semantic-release/exec"
› ✔  Completed step "generateNotes" of plugin "@semantic-release/exec"
› ✔  Created tag v1.0.0
› ℹ  Start step "publish" of plugin "@semantic-release/npm"
[@semantic-release/npm] › ℹ  Skip publishing to npm registry as npmPublish is false
› ✔  Completed step "publish" of plugin "@semantic-release/npm"
› ℹ  Start step "publish" of plugin "@semantic-release/exec"
[@semantic-release/exec] › ℹ  Call script cd dist && sha256sum app-1.0.0.txt > SHA256SUMS
› ✔  Completed step "publish" of plugin "@semantic-release/exec"
› ℹ  Start step "success" of plugin "@semantic-release/exec"
› ✔  Completed step "success" of plugin "@semantic-release/exec"
› ✔  Published release 1.0.0 on default channel
--- result
chore(release): 1.0.0 (HEAD -> main, tag: v1.0.0, origin/main)
feat: initial app
refs/tags/v1.0.0
## 1.0.0 (2026-10-24)

### Features

* initial app 64f0e11
{"name":"app","version":"1.0.0","private":true}
SHA256SUMS
app-1.0.0.txt

Points to take from the log:

  • The "Loaded plugin" lines (filtered out here) list which steps each plugin implements; the first lines of a real log are worth reading when a plugin "does nothing": often it doesn't implement the step you expected.
  • The analyzer and the notes generator both use the conventionalcommits preset, so the version decision and the notes read commits the same way (feat!: is breaking for both; see the feat! pitfall).
  • In prepare, the plugins ran in config order: changelog, npm (version), exec (build), then git committed CHANGELOG.md and package.json as chore(release): 1.0.0 and tagged that commit.
  • The bare v1.0.0 line in the middle is npm version talking: the npm plugin runs it to write the version into package.json.
  • generateNotes runs twice: once to show the notes, and again after prepare, because a prepare step may have changed what the notes should say.
  • ${nextRelease.version} in exec commands is a lodash template; other variables include nextRelease.gitTag, nextRelease.notes, lastRelease.version and branch.name.
  • dist/ is ignored, so the artifacts don't end up in the release commit; they are for the publish step.

Should the release commit back to the repository?

The git plugin (and changelog plugin) make semantic-release commit to your release branch. Many teams prefer not to:

Commit back (changelog + git plugins) Don't commit back
CHANGELOG.md and package.json in the repo are always current the version lives only in tags; package.json says 0.0.0-development
the CI token needs push rights to a protected branch (bypass rules) the CI token only creates tags and releases
extra commits on main; a [skip ci] or commit filter avoids a loop no loops, simpler permissions
the changelog lives in GitHub Releases

The semantic-release project itself recommends the second column. If you need a version file in the repository, the next lessons show tools designed around a reviewed "release PR" (changesets, release-please), which keep branch protection intact.

In CI with GitHub

In GitHub Actions the npm and GitHub plugins come into play. The @semantic-release/github plugin creates the GitHub Release (with notes and assets) and comments on the issues and PRs included in the release. A minimal job (non-run; triggers, permissions and pinning are explained in the CI/CD section):

yaml
# .github/workflows/release.yml
name: release
on:
  push:
    branches: [main]
permissions:
  contents: write        # push tags, create releases
  issues: write          # success/fail comments
  pull-requests: write
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0             # all commits and tags
      - uses: actions/setup-node@v7
        with:
          node-version: 24
      - run: npm ci
      - run: npm test
      - run: npx semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
json
{
  "branches": ["main"],
  "plugins": [
    ["@semantic-release/commit-analyzer", { "preset": "conventionalcommits" }],
    ["@semantic-release/release-notes-generator", { "preset": "conventionalcommits" }],
    ["@semantic-release/github", { "assets": [{ "path": "dist/*.tar.gz" }, { "path": "dist/SHA256SUMS" }] }]
  ]
}

Inside CI there is no --no-ci: semantic-release detects the CI environment and refuses to run on pull-request builds, so a PR can never publish.

Test yourself

In which lifecycle step does the git plugin commit CHANGELOG.md?

  1. verifyConditions
  2. generateNotes
  3. prepare
  4. publish

Why must @semantic-release/git come after the changelog and npm plugins in plugins?

  1. Alphabetical order is required
  2. Plugins run in config order per step, so files must be written before they are committed
  3. The git plugin is slower
  4. It doesn't matter

What is a common reason to avoid committing back to main during releases?

  1. Git can't commit in CI
  2. The CI token then needs to bypass branch protection, and the extra commits complicate CI
  3. Changelogs are useless
  4. Tags can't point at release commits