Release Process¶
With the integration of semantic-release, the release process is fully automated. To enable this, follow the settings for Renovate and semantic-release. Besides, adhering to the Commit Message Pattern is strongly recommended to ensure the release process works as expected.
Release Configuration¶
The release configuration is located in the root directory of the project:
{
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"type": "build",
"release": false
},
{
"type": "chore",
"release": false
},
{
"type": "ci",
"release": false
},
{
"type": "docs",
"release": false
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "refactor",
"release": false
},
{
"type": "revert",
"release": "patch"
},
{
"type": "style",
"release": false
},
{
"type": "test",
"release": false
},
{
"scope": "*major-release*",
"release": "major"
},
{
"scope": "*minor-release*",
"release": "minor"
},
{
"scope": "*patch-release*",
"release": "patch"
},
{
"scope": "*no-release*",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"presetConfig": {
"types": [
{
"type": "build",
"section": "Build"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "ci",
"section": "Continuous Integration"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance"
},
{
"type": "refactor",
"section": "Refactor"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "test",
"section": "Tests"
}
]
}
}
],
"@semantic-release/github"
],
"preset": "conventionalcommits"
}
Based on this configuration, the following trigger rules apply:
A major release is triggered by a ‘BREAKING CHANGE’ or ‘BREAKING-CHANGE’ in the footer or has a
major-releasescope.A minor release is triggered when the commit type is
feator has aminor-releasescope.A patch release is triggered when the commit type is
fix,perf,refactororrevertor has apatch-releasescope.No release is triggered if the commit type is any other type or has a
no-releasescope.
Commit message examples¶
Major release¶
feat: drop Python 3.8 support BREAKING CHANGE: drop Python 3.8 support
chore(major-release): a major release
Minor release¶
feat: add an awesome featurechore(minor-release): a minor release
Patch release¶
fix: fix a silly bugperf: performance improvement for the corerefactor: refactor the base modulerevert: revert a buggy implementationchore(patch-release): a patch release
No release¶
feat(no-release): a feature that should not trigger a releasefix(no-release,core): a fix that should not trigger a release, but with more scopes
Release Tasks¶
The release process includes the following tasks:
Generate a changelog from unreleased commits.
Publish a new GitHub Release and semantic version tag.
Build and publish the documentation to GitHub Pages.
Build and publish the Python package to the configured package repository.
Build and publish the Development and Production Containers with the build cache to GitHub Packages.
The Production Container is tagged as
ghcr.io/serious-scaffold/ss-python:py<PYTHON_VERSION>for the latest version andghcr.io/serious-scaffold/ss-python:py<PYTHON_VERSION>-<PROJECT_VERSION>for archives.The Development Container is tagged as
ghcr.io/serious-scaffold/ss-python/dev:py<PYTHON_VERSION>for the latest version andghcr.io/serious-scaffold/ss-python/dev:py<PYTHON_VERSION>-<PROJECT_VERSION>for archives.The build cache for the Development Container is tagged as
ghcr.io/serious-scaffold/ss-python/dev-cache:py<PYTHON_VERSION>.
Generate a changelog from unreleased commits.
Publish a new GitLab Release and semantic version tag.
Build and publish the documentation to GitLab Pages.
Build and publish the Python package to the configured package repository.
Build and publish the Development and Production Containers with build cache to GitLab Container Registry.
The Production Container is tagged as
registry.gitlab.com/serious-scaffold/ss-python:py<PYTHON_VERSION>for the latest version andregistry.gitlab.com/serious-scaffold/ss-python:py<PYTHON_VERSION>-<PROJECT_VERSION>for archives.The Development Container is tagged as
registry.gitlab.com/serious-scaffold/ss-python/dev:py<PYTHON_VERSION>for the latest version andregistry.gitlab.com/serious-scaffold/ss-python/dev:py<PYTHON_VERSION>-<PROJECT_VERSION>for archives.The build cache for the Development Container is tagged as
registry.gitlab.com/serious-scaffold/ss-python/dev-cache:py<PYTHON_VERSION>.