@linters/semantic-release

1.11.0 • Public • Published

Semantic Release Config

semantic-release shareable config to publish npm packages with GitHub.

  • Provides an informative git commit message for the release commit that does not trigger continuous integration and conforms to the conventional commits specification (e.g., "chore(release): 1.2.3 [skip ci]").
  • Creates a tarball that gets uploaded with each GitHub release.
  • Publishes the same tarball to npm.
  • Commits the version change in package.json.
  • Creates or updates a changelog file.

Install

$ yarn add semantic-release @linters/semantic-release -D

Configuration

Ensure that your CI configuration has the following secret environment variables set:

See each plugin documentation for required installation and configuration steps.

Usage

The shareable config can be configured in the semantic-release configuration file:

{
  "extends": "@linters/semantic-release",
  "branch": "master"
}

Plugins

This configuration uses the following plugins:

GitHub workflows

If you're configuring GitHub actions the following yaml configuration will help you do just that:

name: release

on:
  push:
    branches:
      - master

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12
          registry-url: https://registry.npmjs.org
      - name: Cache node modules
        uses: actions/cache@v1
        id: cache
        with:
          path: node_modules
          key: node-modules-${{ hashFiles('**/yarn.lock') }}

      - name: Install Dependencies
        if: steps.cache.outputs.cache-hit != 'true'
        run: yarn install

      - run: npx semantic-release
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

Package Sidebar

Install

npm i @linters/semantic-release

Weekly Downloads

15

Version

1.11.0

License

none

Unpacked Size

13.9 kB

Total Files

5

Last publish

Collaborators

  • michal.jarnot