semantic-release
AboutGitHubNeed Help?
master
master
  • README
  • Usage
    • Getting started
    • Installation
    • CI Configuration
    • Configuration
    • Plugins
    • Release Workflow configuration
    • Shareable configurations
  • Extending
    • Plugins
    • Shareable configuration
  • Recipes
    • CI configurations
      • CircleCI 2.0
      • Travis CI
      • GitLab CI
      • GitHub Actions
      • Jenkins CI
    • Git hosted services
      • Git authentication with SSH keys
    • Release Workflow
      • Publishing on distribution channels
      • Publishing maintenance releases
      • Publishing pre-releases
  • Developer guide
    • JavaScript API
    • Plugin development
    • Shareable configuration development
  • Support
    • Resources
    • Frequently Asked Questions
    • Troubleshooting
    • Node version requirement
    • Node Support Policy
    • Git version requirement
Powered by GitBook
On this page
  • Local installation
  • Global installation
  • Notes
Edit on GitHub
  1. Usage

Installation

PreviousGetting startedNextCI Configuration

Last updated 9 months ago

Local installation

For we recommend installing semantic-release locally and running the semantic-release command with :

npm install --save-dev semantic-release

Then in the CI environment:

npx semantic-release

Note: npx is a tool bundled with npm@>=5.2.0. It is used to conveniently find the semantic-release binary and to execute it. See for more details.

Global installation

For other type of projects we recommend installing semantic-release directly in the CI environment, also with :

npx semantic-release

Notes

  1. If you've globally installed semantic-release then we recommend that you set the major semantic-release version to install. For example, by using npx semantic-release@18. This way you control which major version of semantic-release is used by your build, and thus avoid breaking the build when there's a new major version of semantic-release.

  2. Pinning semantic-release to an exact version makes your releases even more deterministic. But pinning also means you, or a bot, must upgrade semantic-release when a new version is released.

  3. You can use to get automatic updates for semantic-release in either of the above scenarios. Put this in your Renovate configuration file:

    {
      "regexManagers": [
        {
          "description": "Update semantic-release version used by npx",
          "fileMatch": ["^\\.github/workflows/[^/]+\\.ya?ml$"],
          "matchStrings": ["\\srun: npx semantic-release@(?<currentValue>.*?)\\s"],
          "datasourceTemplate": "npm",
          "depNameTemplate": "semantic-release"
        }
      ]
    }
  4. npx is a tool bundled with npm@>=5.2.0. You can use it to install (and run) the semantic-release binary. See for more details.

Node modules projects
npx
npx
Renovate's regex manager
What is npx
What is npx