Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

semantic-release

Package Overview
Dependencies
Maintainers
4
Versions
411
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semantic-release

Automated semver compliant package publishing

  • 20.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9M
decreased by-8.25%
Maintainers
4
Weekly downloads
 
Created

What is semantic-release?

The semantic-release npm package automates the versioning and package publishing process based on semantic versioning (SemVer) principles. It analyzes commits since the last release to determine the type of version change (major, minor, or patch) and generates a changelog. It then publishes the new version to npm and can also update GitHub/GitLab releases.

What are semantic-release's main functionalities?

Automated Version Management

Automatically analyzes commits, determines the next semantic version, generates a changelog, and publishes the package. The code snippet shows a basic configuration in a package.json file.

"release": {
  "branches": ["main"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/npm",
    "@semantic-release/github"
  ]
}

Customizable Plugins

semantic-release's behavior can be customized with plugins. This example configures the commit analyzer and release notes generator to use the Angular preset.

"plugins": [
  ["@semantic-release/commit-analyzer", {
    "preset": "angular"
  }],
  ["@semantic-release/release-notes-generator", {
    "preset": "angular"
  }],
  "@semantic-release/npm",
  "@semantic-release/github"
]

Continuous Integration (CI) Configuration

Integrates with CI tools like GitHub Actions to automate the release process. This example shows a GitHub Actions workflow that sets up a job for semantic-release.

{
  "name": "semantic-release",
  "on": {
    "push": {
      "branches": ["main"]
    }
  },
  "jobs": {
    "release": {
      "runs-on": "ubuntu-latest",
      "steps": [
        {
          "name": "Checkout repository",
          "uses": "actions/checkout@v2"
        },
        {
          "name": "Setup Node.js",
          "uses": "actions/setup-node@v1",
          "with": {
            "node-version": "12"
          }
        },
        {
          "name": "semantic-release",
          "uses": "semantic-release-plus/docker@v1",
          "env": {
            "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}",
            "NPM_TOKEN": "${{ secrets.NPM_TOKEN }}"
          }
        }
      ]
    }
  }
}

Other packages similar to semantic-release

Keywords

FAQs

Package last updated on 25 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc