@code-quality/semantic-release-config

1.1.0 • Public • Published

Actions Status

Semantic Release Config

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

Plugins

This configuration uses the following plugins:

Summary

  • 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]\n\nnotes").
  • 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 @code-quality/semantic-release-config -D

Usage

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

{
  "extends": "@code-quality/semantic-release-config",
  "branch": "master"
}

Configuration

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

See each plugin documentation for required installation and configuration steps.

GitHub workflows

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

name: CI

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
      - 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 @code-quality/semantic-release-config

Weekly Downloads

5

Version

1.1.0

License

none

Unpacked Size

7.58 kB

Total Files

9

Last publish

Collaborators

  • michal.jarnot