semantic-release-config-techor
TypeScript icon, indicating that this package has built-in type declarations

3.0.23 • Public • Published

techor

Techor's semantic release config for publishing workspace packages

NPM Version NPM Version NPM package ( download / month ) Follow @mastercorg Github release actions


Getting Started

Skip if you have already run npm install techor:

npm install semantic-release-config-techor -D

You can also install this package only on CI.

Set up your package.json

{
    "publishConfig": {
        "access": "public",
        "provenance": true
    }
}

Configuration

Create a release.config.js file in your project root and extend techor:

module.exports = {
    extends: 'semantic-release-config-techor'
}

For full configuration, check out the configure.js file and Techor's conventional commits for the release rules

Since .plugins use arrays for configuration, even extends will override all preset plugins.

I provide configure(options) API to allow you to set additional config friendly:

const releaseRules = require('semantic-release-config-techor/rules')
const configure = require('semantic-release-config-techor/configure')

module.exports = configure({
    branches: [
        '+([0-9])?(.{+([0-9]),x}).x',
        'main',
        'next',
        'next-major',
        {
            name: 'beta',
            prerelease: true
        },
        {
            name: 'alpha',
            prerelease: true
        }
    ],
    plugins: {
        '@semantic-release/commit-analyzer': { preset: 'techor', releaseRules },
        '@semantic-release/release-notes-generator': { preset: 'techor' },
        '@semantic-release/exec': {
            prepareCmd: 'pnpm run check && pnpm run build',
            publishCmd: 'techor version ${nextRelease.version}'
        },
        '@semantic-release/npm': true,
        '@semantic-release/github': true
    }
})

The above example is equivalent to the extends: 'semantic-release-config-techor' preset.

For example, to add assets for a GitHub Release and keep the default plugins:

module.exports = configure({
    plugins: {
        '@semantic-release/github': {
            assets: [
                 {
                    path: 'packages/css/dist/index.browser.js',
                    name: 'master-css.js',
                    label: 'master-css.js'
                }
            ]
        }
    }
})

Run the command

npm exec semantic-release

NPM Version

Package Sidebar

Install

npm i semantic-release-config-techor

Homepage

aron.tw

Weekly Downloads

218

Version

3.0.23

License

MIT

Unpacked Size

15.9 kB

Total Files

8

Last publish

Collaborators

  • 1aron