diff --git a/README.md b/README.md index 2787056..a919b1d 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,80 @@ ## Introduction -This container can be used to create project releases. It encapsulates semantic-release and all necessary plugins. +This container can be used to create project releases. It encapsulates [semantic-release](https://semantic-release.gitbook.io/semantic-release) and all necessary plugins. See [package.json](package.json) for details. This is a npm application running in an alpine container. ## Usage +### Example `.releaserc.yaml` for a Gitlab project + +```yaml +--- +branches: + - 'main' + - 'master' + - 'production' + +ci: true +debug: true +dryRun: false +tagFormat: '${version}' +preset: 'conventionalcommits' + +gitlabUrl: 'https://gitlab.example.com' +gitlabApiPathPrefix: '/api/v4' + +plugins: + - path: '@semantic-release/commit-analyzer' + releaseRules: + - { breaking: true, release: major } + - { type: build, release: patch } + - { type: chore, release: false } + - { type: ci, release: false } + - { type: dep, release: patch } + - { type: docs, release: patch } + - { type: feat, release: minor } + - { type: fix, release: patch } + - { type: perf, release: patch } + - { type: refactor, release: false } + - { type: revert, release: patch } + - { type: test, release: false } + + - path: '@semantic-release/release-notes-generator' + writerOpts: + groupBy: 'type' + commitGroupsSort: 'title' + commitsSort: 'header' + linkCompare: true + linkReferences: true + parserOpts: + # detect JIRA issues in merge commits + issuePrefixes: ['SUP', 'BUG', 'FEATURE'] + mergePattern: "^Merge branch '(.*)' into (.*)$" + mergeCorrespondence: ['branch_src', 'branch_dst'] + noteKeywords: ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"] + presetConfig: + issueUrlFormat: "https://jira.example.com/browse/{{prefix}}{{id}}" + types: + - { type: 'build', section: '๐Ÿ‘ท Build' } + - { type: 'chore', section: '๐Ÿงน Chorses' } + - { type: 'ci', section: '๐Ÿšฆ CI/CD' } + - { type: 'dep', section: '๐Ÿ‘พ Dependencies' } + - { type: 'docs', section: '๐Ÿ“š Docs' } + - { type: 'feat', section: '๐Ÿš€ Features' } + - { type: 'fix', section: '๐Ÿ› ๏ธ Fixes' } + - { type: 'perf', section: 'โฉ Performance' } + - { type: 'refactor', section: '๐Ÿ”จ Refactor' } + - { type: 'revert', section: '๐Ÿ™…โ€โ™‚๏ธ Reverts' } + - { type: 'test', section: '๐Ÿšฅ Tests' } + + - path: '@semantic-release/changelog' + - path: '@semantic-release/git' + +verifyConditions: + - '@semantic-release/changelog' + - '@semantic-release/git' +``` + ### Gitlab This is a example to use this container in Gitlab.