Skip to content

Commit

Permalink
Merge pull request #15 from voxpupuli/update_docu
Browse files Browse the repository at this point in the history
doc: Extend docu with helpful links and examples for .releaserc.yaml
  • Loading branch information
rwaffen authored Sep 24, 2024
2 parents 5c7ac2f + d4cd771 commit c0acaa4
Showing 1 changed file with 71 additions and 1 deletion.
72 changes: 71 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c0acaa4

Please sign in to comment.