Skip to content

Instantly share code, notes, and snippets.

@toygame
Last active January 17, 2023 23:20
Show Gist options
  • Save toygame/6aff91d74fa1307c39884cee59eb615a to your computer and use it in GitHub Desktop.
Save toygame/6aff91d74fa1307c39884cee59eb615a to your computer and use it in GitHub Desktop.
Semantic-release configuration that deploys on Gitlab
branches: ['master']
ci: true
debug: true
dryRun: false
tagFormat: '${version}'
# Global plugin options (will be passed to all plugins)
preset: 'conventionalcommits'
gitlabUrl: 'https://gitlab.com/' # your gitlab url
# slackWebhook: 'https://slack.xxx.com/hooks/q3dabbqc6yjyg9x6616o3atgkkr'
# Responsible for verifying conditions necessary to proceed with the release:
# configuration is correct, authentication token are valid, etc...
verifyConditions:
- '@semantic-release/changelog'
- '@semantic-release/git'
- '@semantic-release/gitlab'
# Responsible for determining the type of the next release (major, minor or patch).
# If multiple plugins with a analyzeCommits step are defined, the release type will be
# the highest one among plugins output.
# Look details at: https://github.com/semantic-release/commit-analyzer#configuration
analyzeCommits:
- path: '@semantic-release/commit-analyzer'
releaseRules:
- type: 'breaking'
release: 'major'
- type: 'feat'
release: 'minor'
- type: '*'
release: 'patch'
# Responsible for generating the content of the release note.
# If multiple plugins with a generateNotes step are defined,
# the release notes will be the result of the concatenation of each plugin output.
generateNotes:
- path: '@semantic-release/release-notes-generator'
writerOpts:
groupBy: 'type'
commitGroupsSort: 'title'
commitsSort: 'header'
linkCompare: true
linkReferences: true
presetConfig:
types:
- type: chore
section: Others
- type: revert
section: Reverts
- type: feat
section: Features
- type: fix
section: Bug Fixes
- type: improvement
section: Feature Improvements
- type: docs
section: Docs
- type: style
section: Styling
- type: refactor
section: Code Refactoring
- type: perf
section: Performance Improvements
- type: test
section: Tests
- type: build
section: Build System
- type: ci
section: CI
# Responsible for preparing the release, for example creating or updating files
# such as package.json, CHANGELOG.md, documentation or compiled assets
# and pushing a commit.
prepare:
- path: '@semantic-release/changelog'
- path: '@semantic-release/git'
message: 'RELEASE: ${nextRelease.version}'
assets: ['CHANGELOG.md']
# Responsible for publishing the release.
publish:
- path: '@semantic-release/gitlab'
success: false
# - path: 'semantic-release-slack-bot'
# notifyOnSuccess: true
# markdownReleaseNotes: false
fail: false
# - path: 'semantic-release-slack-bot'
# notifyOnFail: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment