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 Convention 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:
{
"branches": [
"xuan.hu/setuptools-test"
],
"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": "patch"
},
{
"type": "revert",
"release": "patch"
},
{
"type": "style",
"release": false
},
{
"type": "test",
"release": false
},
{
"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 of the commit message.
A minor release is triggered when the latest commit type is
feat
.A patch release is triggered when the latest commit type is
fix
,perf
,refactor
orrevert
.No release is triggered if the latest commit type is any other type or has a
no-release
scope.
Commit message examples¶
Major release¶
feat: drop Python 3.8 support
BREAKING CHANGE: drop Python 3.8 support
Minor release¶
feat: add an awesome feature
Patch release¶
fix: fix a silly bug
perf: performance improvement for the core
refactor: refactor the base module
revert: revert a buggy implementation
No release¶
feat(no-release): a feature that should not trigger a release
fix(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>
.