PYTHON-SEMANTIC-RELEASE(1)
๐ NAME ๐
okay bestie, say hi to python-semantic-release ๐
โ aka the star of this here manual page, PYTHON-SEMANTIC-RELEASE(1), from the python-semantic-release manual. she's a lot, but she's worth it, i promise.
Python Semantic Release (we call her PSR around here ๐ซถ) is an automated release mechanism that figures out your releases for you, based on SemVer and Commit Message Conventions, for all your Git projects. no cap.
so like, what's the whole point?? the vibe is: she reads your latest commit messages, parses them, and detects what the next version of your project should be. if those commit messages are describing changes that would need a major, minor, or patch version bump, PSR bumps the version number accordingly, automatically. iconic behaviour, honestly. but that's not even all of it โ she doesn't just stop there, she'll help you automate the whole release process. she'll update your project code and your distribution artifact, upload that artifact, and post changelogs over to a remotely hosted Version Control System (VCS). โจ
she's built to run inside a CI/CD pipeline service, which is her natural habitat, but she can also be run locally if that's your thing. ๐
fun origin story for you ๐: this project was originally inspired by the semantic-release project for JavaScript (https://github.com/semantic-release/semantic-release) by Stephan Bรถnnemann. but! the codebases have significantly deviated since then, because PSR has been driving towards the goal of providing flexible changelogs and simple initial setup. glow-up fr fr. ๐ฅ
๐ ๏ธ INSTALLATION ๐ ๏ธ
get her installed, bestie:
python3 -m pip install python-semantic-release
semantic-release --help
Python Semantic Release is also available from conda-forge (https://anaconda.org/conda-forge/python-semantic-release) or as a GitHub Action (see #gh-actions). โจ
and go read more about the setup and configuration in the Getting Started Guide. ๐ฆ
๐ DOCUMENTATION CONTENTS ๐
๐ CHANGELOG ๐
v10.6.1 (2026-07-06)
๐ชฒ Bug Fixes
- changelog: Fix handling of whitespace commit bodies in changelog template filter (PR#1457 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1457,d95e46eโhttps://github.com/python-semantic-release/python-semantic-release/commit/d95e46e7603b559c6de6160092c0b9af9a428f02) - cmd-version: Fix non-styled error msg when strict & no new version, closes #1423 (
https://github.com/python-semantic-release/python-semantic-release/issues/1423) (PR#1437 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1437,5e8f94cโhttps://github.com/python-semantic-release/python-semantic-release/commit/5e8f94c3d81ccf17598af8a77659dd31df2ea403) - config: Eliminate
.git/in parent dir warnings for monorepos configured with.., closes #1418 (https://github.com/python-semantic-release/python-semantic-release/issues/1418) (PR#1444 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1444,7a1f822โhttps://github.com/python-semantic-release/python-semantic-release/commit/7a1f822c06f5258f8b82ea9563b56979d3bc1cd9)
๐ Documentation
- CHANGELOG: Add v9.21.2 changelog details for website (
a4115cfโhttps://github.com/python-semantic-release/python-semantic-release/commit/a4115cfe98b98598adc1b44e04565ec0254b604d) - configuration: Document
repo_dirconfig option (PR#1444 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1444,7a1f822โhttps://github.com/python-semantic-release/python-semantic-release/commit/7a1f822c06f5258f8b82ea9563b56979d3bc1cd9)
โ๏ธ Build System
- deps: Expand
python-gitlabdependency range to include v8.0.0+ (PR#1451 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1451,a4b9a43โhttps://github.com/python-semantic-release/python-semantic-release/commit/a4b9a438846c9f795b8bbaf2b145077fb6c3f7a5) - deps: Expand
tomlkitdependency range to include v0.14.0+ & v0.15.0+ (028d539โhttps://github.com/python-semantic-release/python-semantic-release/commit/028d53909276270ce969d246ed739afd7808eacd) - deps: Extend
clickdependency range to include v8.2+ (01707eaโhttps://github.com/python-semantic-release/python-semantic-release/commit/01707ead53e093fe217a82c9ff9898c5e4daf9dc)
v10.6.0 (2026-07-04)
โจ Features
- cmd-version: Add file replacement variant for
version_variables, closes #1375 (https://github.com/python-semantic-release/python-semantic-release/issues/1375) (PR#1391 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1391,95ce7ecโhttps://github.com/python-semantic-release/python-semantic-release/commit/95ce7ecdbab0fc0986d1fcf442cd8cf99a4b6e4f) - parser-emoji: Adds more non-release triggering emojis to the default emoji parser (PR#1410 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1410,2833aa9โhttps://github.com/python-semantic-release/python-semantic-release/commit/2833aa943a6a016b8208146a89f7b4ec0efa6cd0)
๐ชฒ Bug Fixes
- cmd-config-generate: Fix config output for Microsoft Windows UTF-8 encoding, closes #702 (
https://github.com/python-semantic-release/python-semantic-release/issues/702) (PR#1400 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1400,0343194โhttps://github.com/python-semantic-release/python-semantic-release/commit/03431947833b4e3f3fc79b09fc626e0f30508a2b) - cmd-publish: Fix handling of asset uploading errors on publish, closes #1395 (
https://github.com/python-semantic-release/python-semantic-release/issues/1395) (PR#1397 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1397,81a0f98โhttps://github.com/python-semantic-release/python-semantic-release/commit/81a0f98b0f36b65df5039ab335760295322bfd9c) - github: Fix bubble up errors of asset uploads for GitHub (PR#1397 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1397,81a0f98โhttps://github.com/python-semantic-release/python-semantic-release/commit/81a0f98b0f36b65df5039ab335760295322bfd9c) - hvcs: Mask git credential URL in very verbose debug logs, closes #1426 (
https://github.com/python-semantic-release/python-semantic-release/issues/1426) (PR#1445 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1445,811afb0โhttps://github.com/python-semantic-release/python-semantic-release/commit/811afb00de382ff425b766b97c83d2246f9cfb16)
๐ Documentation
- cmd-config-generate: Add Windows PowerShell specific generate-config usage example (PR#1400 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1400,0343194โhttps://github.com/python-semantic-release/python-semantic-release/commit/03431947833b4e3f3fc79b09fc626e0f30508a2b) - configuration: Modify
version_variablesdefinition to include new file replacement (PR#1391 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1391,95ce7ecโhttps://github.com/python-semantic-release/python-semantic-release/commit/95ce7ecdbab0fc0986d1fcf442cd8cf99a4b6e4f) - examples: Update references to github actions for hash references (PR#1449 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1449,873da58โhttps://github.com/python-semantic-release/python-semantic-release/commit/873da5894a2b03283e93019801e3012c045f361a) - package: Change package changelog link to doc website (PR#1434 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1434,05f897fโhttps://github.com/python-semantic-release/python-semantic-release/commit/05f897f4d5c6d91495c1bf55cc704815be887d69)
v10.5.3 (2025-12-14)
๐ชฒ Bug Fixes
- cmd-version: Resolve unauthenticated git repo issues for upstream verification, closes #1373 (
https://github.com/python-semantic-release/python-semantic-release/issues/1373) (PR#1388 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1388,e164f68โhttps://github.com/python-semantic-release/python-semantic-release/commit/e164f682bfa4ca1e7cbe77aa068202fd8094eec7) - github-action: Fix failed signing issue when ssh was missing from action environment, closes #1376 (
https://github.com/python-semantic-release/python-semantic-release/issues/1376) (PR#1389 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1389,18b7edaโhttps://github.com/python-semantic-release/python-semantic-release/commit/18b7edadd7e7dfe42ec43110acf5e1bd8bcd7eb3) - parser-conventional-monorepo: Fix parser opts validator for outside dir path matches, closes #1380 (
https://github.com/python-semantic-release/python-semantic-release/issues/1380) (PR#1382 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1382,a51eaddโhttps://github.com/python-semantic-release/python-semantic-release/commit/a51eadd8414a7e9cbfa66837ee5a840a6331dfa1)
v10.5.2 (2025-11-10)
๐ชฒ Bug Fixes
- cmd-version: Toggle verify upstream off when no version commit is made (PR#1370 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1370,e0b3b70โhttps://github.com/python-semantic-release/python-semantic-release/commit/e0b3b7075a4c98cd7af97e0b8470872c11e7aeb9)
v10.5.1 (2025-11-10)
๐ชฒ Bug Fixes
- cmd-version: Fix upstream change detection to succeed without branch tracking (PR#1369 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1369,7086257โhttps://github.com/python-semantic-release/python-semantic-release/commit/7086257b641e241dc9a8d742bd62e3698a8b8173)
v10.5.0 (2025-11-09)
โจ Features
- cmd-version: Add automatic repository un-shallowing to version workflow (PR#1366 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1366,90a1ffaโhttps://github.com/python-semantic-release/python-semantic-release/commit/90a1ffa55c5a1605c59cb26a1797f9a37fdfa784) - cmd-version: Add functionality to create & update partial version tags (PR#1115 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1115,a28f940โhttps://github.com/python-semantic-release/python-semantic-release/commit/a28f9401c4b285aa1007b72eb051d42567f33f93) - cmd-version: Adds c-macro style version definition support to
version_variables, closes #1348 (https://github.com/python-semantic-release/python-semantic-release/issues/1348) (PR#1349 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1349,4ce1fcaโhttps://github.com/python-semantic-release/python-semantic-release/commit/4ce1fcac60ac73657a4aaaaa3cb7c4afc7eac2c1) - cmd-version: Adds upstream check into workflow to prevent commit push collisions (PR#1360 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1360,d77193eโhttps://github.com/python-semantic-release/python-semantic-release/commit/d77193e30807968ba6a26bd356a868db62dc1098)
๐ชฒ Bug Fixes
cmd-versionโ no more regex teeny-tiny meltdowns whentag_formatgets spicy: Prevent regular expression errors ontag_format๐ (PR#1367 <https://github.com/python-semantic-release/python-semantic-release/pull/1367>,e7d7aa7<https://github.com/python-semantic-release/python-semantic-release/commit/e7d7aa74a216cd2fdd78afc1e0e8b6b8044954ec>)
๐ Documentation
commandsโ we finally wrote down that whole automated upstream version checking thing that happens when a version gets created ๐ (PR#1360 <https://github.com/python-semantic-release/python-semantic-release/pull/1360>,d77193e<https://github.com/python-semantic-release/python-semantic-release/commit/d77193e30807968ba6a26bd356a868db62dc1098>)configurationโ bestie, theadd_partial_tagssetting now has a description and usage examples, we ate ๐ (PR#1115 <https://github.com/python-semantic-release/python-semantic-release/pull/1115>,a28f940<https://github.com/python-semantic-release/python-semantic-release/commit/a28f9401c4b285aa1007b72eb051d42567f33f93>)configurationโ fixed thetag_formatdefinition, it was giving typo energy lowkey (PR#1367 <https://github.com/python-semantic-release/python-semantic-release/pull/1367>,e7d7aa7<https://github.com/python-semantic-release/python-semantic-release/commit/e7d7aa74a216cd2fdd78afc1e0e8b6b8044954ec>)configurationโversion_variablesexamples got updated with a c-macro style replacement, iconic โจ (PR#1349 <https://github.com/python-semantic-release/python-semantic-release/pull/1349>,4ce1fca<https://github.com/python-semantic-release/python-semantic-release/commit/4ce1fcac60ac73657a4aaaaa3cb7c4afc7eac2c1>)github-actionsโ release job outputs definition now lives in the example, so you can copy-paste and go ๐ซถ (PR#1344 <https://github.com/python-semantic-release/python-semantic-release/pull/1344>,0fb4875<https://github.com/python-semantic-release/python-semantic-release/commit/0fb4875fa24ed283ed2d97ff6ab1879669a787ca>)github-actionsโ yeeted the verify upstream status step right outta the example workflow ๐ (PR#1360 <https://github.com/python-semantic-release/python-semantic-release/pull/1360>,d77193e<https://github.com/python-semantic-release/python-semantic-release/commit/d77193e30807968ba6a26bd356a868db62dc1098>)github-actionsโ example updated so you don't have to specify the repo checkout's fetch depth anymore, we love to see it ๐ (PR#1366 <https://github.com/python-semantic-release/python-semantic-release/pull/1366>,90a1ffa<https://github.com/python-semantic-release/python-semantic-release/commit/90a1ffa55c5a1605c59cb26a1797f9a37fdfa784>)uv-integrationโ the verify upstream check got removed from the uv integration example too, same vibes ๐ธ (PR#1360 <https://github.com/python-semantic-release/python-semantic-release/pull/1360>,d77193e<https://github.com/python-semantic-release/python-semantic-release/commit/d77193e30807968ba6a26bd356a868db62dc1098>)uv-integrationโ and this example also no longer needs you to specify the repo checkout's fetch depth ๐ (PR#1366 <https://github.com/python-semantic-release/python-semantic-release/pull/1366>,90a1ffa<https://github.com/python-semantic-release/python-semantic-release/commit/90a1ffa55c5a1605c59cb26a1797f9a37fdfa784>)
โ๏ธ Build System
depsโ glow-up time fortomlkit: bumped from~=0.11.0to~=0.13.0๐ (PR#1355 <https://github.com/python-semantic-release/python-semantic-release/pull/1355>,55c94ec<https://github.com/python-semantic-release/python-semantic-release/commit/55c94ecde1aec47b88aa172d031ab33afa7f795d>)depsโ the github-actions container image got switched topython:3.14-slim-trixie, new base image who dis ๐ฅ (PR#1346 <https://github.com/python-semantic-release/python-semantic-release/pull/1346>,1a23712<https://github.com/python-semantic-release/python-semantic-release/commit/1a237125badcb597ae7a92db4e01c2ff3293bce8>)
๐ก Additional Release Information
cmd-versionโ okay so if you were previously handling the unshallowing of a repository clone in your CI/CD pipelines, you may now remove that step from your workflow. PSR will now detect a shallow repository and unshallow it before evaluating the commit history. that's it, that's the whole vibe, no cap ๐
v10.4.1 (2025-09-13)
๐ชฒ Bug Fixes
cmd-versionโ fixed the error where--no-tagwas not respected, closes #1304 <https://github.com/python-semantic-release/python-semantic-release/issues/1304> (PR#1329 <https://github.com/python-semantic-release/python-semantic-release/pull/1329>,b090fa2<https://github.com/python-semantic-release/python-semantic-release/commit/b090fa2efc0ebfb40bdc572fea307d356af95a3f>) โ that flag was out here doing whatever it wanted and we said absolutely not ๐
๐ Documentation
CHANGELOGโ hyperlink in v10.4.0's additional info paragraph got updated, tiny fix, big slay ๐ฆ (PR#1323 <https://github.com/python-semantic-release/python-semantic-release/pull/1323>,98ef722<https://github.com/python-semantic-release/python-semantic-release/commit/98ef722b65bd6a37492cf7ec8b0425800f719114>)getting-started-guideโ removed the notice about lack of monorepo support, closes #1326 <https://github.com/python-semantic-release/python-semantic-release/issues/1326> because guess what, monorepos ARE supported now bestie ๐ญ (PR#1327 <https://github.com/python-semantic-release/python-semantic-release/pull/1327>,3f21f3f<https://github.com/python-semantic-release/python-semantic-release/commit/3f21f3fc47a0dacc11ec95feb2a23f8cf132e77b>)github-actionsโ the recommended upstream detection script's upstream name parsing got fixed, it was parsing wrong and we were like ๐ (PR#1328 <https://github.com/python-semantic-release/python-semantic-release/pull/1328>,ccc91c0<https://github.com/python-semantic-release/python-semantic-release/commit/ccc91c09fab45358c7e52b42e6c0607c68c9d8f3>)
v10.4.0 (2025-09-08)
โจ Features
configโconventional-monorepois now a validcommit_parsertype, adding it to the roster fr fr (PR#1143 <https://github.com/python-semantic-release/python-semantic-release/pull/1143>,e18f866<https://github.com/python-semantic-release/python-semantic-release/commit/e18f86640a78b374a327848b9e2ba868003d1a43>)parserโ brand newconventional-commitsstandard parser for monorepos, closes #614 <https://github.com/python-semantic-release/python-semantic-release/issues/614> and honestly it's giving main character energy ๐ (PR#1143 <https://github.com/python-semantic-release/python-semantic-release/pull/1143>,e18f866<https://github.com/python-semantic-release/python-semantic-release/commit/e18f86640a78b374a327848b9e2ba868003d1a43>)
๐ Documentation
- configuration guide for monorepo use with PSR got added, so you're not out here guessing ๐ง (PR#1143 <https://github.com/python-semantic-release/python-semantic-release/pull/1143>,
e18f866<https://github.com/python-semantic-release/python-semantic-release/commit/e18f86640a78b374a327848b9e2ba868003d1a43>) commit-parsersโ introduced the conventional commit monorepo parser options & features, all documented ๐ (PR#1143 <https://github.com/python-semantic-release/python-semantic-release/pull/1143>,e18f866<https://github.com/python-semantic-release/python-semantic-release/commit/e18f86640a78b374a327848b9e2ba868003d1a43>)configurationโ thecommit_parseroption got updated with the newconventional-monorepovalue โจ (PR#1143 <https://github.com/python-semantic-release/python-semantic-release/pull/1143>,e18f866<https://github.com/python-semantic-release/python-semantic-release/commit/e18f86640a78b374a327848b9e2ba868003d1a43>)
๐ก Additional Release Information
configโ This release introduces a new built-in parser type that can be utilized for monorepo projects. The type value isconventional-monorepoand when specified it will apply the conventional commit parser to a monorepo environment. This parser has specialized options to help handle monorepo projects as well. For more information, please refer to the Monorepo Docs </configuration/configuration-guides/monorepos.html>. go read it, it's worth it ๐
v10.3.2 (2025-09-06)
๐ชฒ Bug Fixes
cmd-versionโ stopped the errors that popped off when PSR is executed in non-GitHub CI environments, closes #1315 <https://github.com/python-semantic-release/python-semantic-release/issues/1315> (PR#1322 <https://github.com/python-semantic-release/python-semantic-release/pull/1322>,4df4be4<https://github.com/python-semantic-release/python-semantic-release/commit/4df4be465710e3b31ba65487069eccef1eeb8be1>)
โก Performance Improvements
cmd-versionโ operations got re-ordered for faster parsing in version determination, speed โจ (PR#1310 <https://github.com/python-semantic-release/python-semantic-release/pull/1310>,63e435b<https://github.com/python-semantic-release/python-semantic-release/commit/63e435ba466e1e980b9680d0f759950e5e598a61>)
๐ Documentation
uv-integrationโ added--no-changelogto the build step to increase job speed, work smarter not harder ๐ซถ (PR#1316 <https://github.com/python-semantic-release/python-semantic-release/pull/1316>,e1aece1<https://github.com/python-semantic-release/python-semantic-release/commit/e1aece18ae1998b1523be65b1e569837a7054251>)
๐ก Additional Release Information
cmd-versionโ Unfortunately, PSR introduced a bug in 10.3.0 when attempting to provide more CI outputs for GitHub Actions. It required our GitHub client interface to be loaded and even if it was not using GitHub CI to be run. This caused errors in Gitea and likely GitLab/Bitbucket environments. This change prevents that from happening but if any users pipelines were intentionally presenting the environment variableGITHUB_OUTPUTto enable action output to enable passing along internal outputs of PSR then their hack will no longer work after this change.
so yeah, that hack is gone bestie, no more sneaky GITHUB_OUTPUT tricks ๐ญ
v10.3.1 (2025-08-06)
๐ชฒ Bug Fixes
github-actionsโ refactored the action output error checking for non-release executions, closes #1307 <https://github.com/python-semantic-release/python-semantic-release/issues/1307> (PR#1308 <https://github.com/python-semantic-release/python-semantic-release/pull/1308>,5385724<https://github.com/python-semantic-release/python-semantic-release/commit/538572426cb30dd4d8c99cea660e290b56361f75>)
๐ Documentation
github-actionsโ docs adjusted for direct links to action example workflows, closes #1303 <https://github.com/python-semantic-release/python-semantic-release/issues/1303> ๐ (PR#1309 <https://github.com/python-semantic-release/python-semantic-release/pull/1309>,8efebe2<https://github.com/python-semantic-release/python-semantic-release/commit/8efebe281be2deab1b203cd01d9aedf1542c4ad4>)
v10.3.0 (2025-08-04)
โจ Features
github-actionsโcommit_shais now a GitHub Actions output value, closes #717 <https://github.com/python-semantic-release/python-semantic-release/issues/717> and we're obsessed ๐ (PR#1289 <https://github.com/python-semantic-release/python-semantic-release/pull/1289>,39b647b<https://github.com/python-semantic-release/python-semantic-release/commit/39b647ba62e242342ef5a0d07cb0cfdfa7769865>)- github-actions โ add
previous_versionas a GitHub Actions output value ๐ (PR#1302 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1302, commitc0197b7โhttps://github.com/python-semantic-release/python-semantic-release/commit/c0197b711cfa83f5b13f9ae4f37e555b26f544d9) - github-actions โ add
release_notesas a GitHub Actions output value โจ (PR#1300 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1300, commita3fd23cโhttps://github.com/python-semantic-release/python-semantic-release/commit/a3fd23cb0e49f74cb4a345048609d3643a665782) - github-actions โ add the release link as a GitHub Actions output value ๐ (PR#1301 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1301, commit888aea1โhttps://github.com/python-semantic-release/python-semantic-release/commit/888aea1e450513ac7339c72d8b50fabdb4ac177b)
๐ชฒ Bug Fixes
- github-actions โ fix those newlines in the variable output, bestie ๐ญ (PR#1300 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1300, commita3fd23cโhttps://github.com/python-semantic-release/python-semantic-release/commit/a3fd23cb0e49f74cb4a345048609d3643a665782) - util โ fixes the no-op log output when a commit message contains square-brackets, closes #1251 โ
https://github.com/python-semantic-release/python-semantic-release/issues/1251(PR#1287 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1287, commitf25883fโhttps://github.com/python-semantic-release/python-semantic-release/commit/f25883f8403365b787e7c3e86d2d982906804621)
๐ Documentation
- getting-started โ fixes the
changelog.exclude_commit_patternsexample in the startup guide, closes #1291 โhttps://github.com/python-semantic-release/python-semantic-release/issues/1291(PR#1292 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1292, commit2ce2e94โhttps://github.com/python-semantic-release/python-semantic-release/commit/2ce2e94e1930987a88c0a5e3d59baa7cb717f557) - github-actions โ add a description of the
commit_shaGitHub Action output in the docs ๐ (PR#1289 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1289, commit39b647bโhttps://github.com/python-semantic-release/python-semantic-release/commit/39b647ba62e242342ef5a0d07cb0cfdfa7769865) - github-actions โ add a description of the
previous_releaseGitHub Action output ๐ (PR#1302 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1302, commitc0197b7โhttps://github.com/python-semantic-release/python-semantic-release/commit/c0197b711cfa83f5b13f9ae4f37e555b26f544d9) - github-actions โ add a description of the
release_notesGitHub Action output ๐ (PR#1300 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1300, commita3fd23cโhttps://github.com/python-semantic-release/python-semantic-release/commit/a3fd23cb0e49f74cb4a345048609d3643a665782) - github-actions โ add a description of the release link GitHub Action output ๐ (PR#1301 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1301, commit888aea1โhttps://github.com/python-semantic-release/python-semantic-release/commit/888aea1e450513ac7339c72d8b50fabdb4ac177b) - README โ update the broken links so they match where stuff actually moved to ๐งญ (PR#1285 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1285, commitf4ec792โhttps://github.com/python-semantic-release/python-semantic-release/commit/f4ec792d73acb34b8f5183ec044a301b593f16f0)
v10.2.0 (2025-06-29)
โจ Features
- cmd-version โ adds the
PACKAGE_NAMEvalue into the build command environment ๐ซถ (commitdb9bc13โhttps://github.com/python-semantic-release/python-semantic-release/commit/db9bc132c8a0398f2cce647730c69a32ca35ba51)
๐ Documentation
- configuration โ update the build command environment definition so it includes the
PACKAGE_NAMEvariable ๐งพ (commit4aa3805โhttps://github.com/python-semantic-release/python-semantic-release/commit/4aa38059ce6b33ca23a547473e9fb8a19d3ffbe1) - uv-integration โ fix the configuration guide for uv usage so the lock file actually gets updated ๐ (commit
5390145โhttps://github.com/python-semantic-release/python-semantic-release/commit/5390145503b4d5dcca8f323e1ba6c5bec0bd079b)
v10.1.0 (2025-06-12)
โจ Features
- cmd-version โ always stage version stamped files and the changelog, even when you're running with
--no-commitโจ๐ , closes #1211 โhttps://github.com/python-semantic-release/python-semantic-release/issues/1211(PR#1214 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1214, commitde62334โhttps://github.com/python-semantic-release/python-semantic-release/commit/de623344cd18b3dbe05823eb90fdd010c5505c92)
๐ Documentation
- cmd-version โ improve the command description & include the common uses ๐ (PR#1214 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1214, commitde62334โhttps://github.com/python-semantic-release/python-semantic-release/commit/de623344cd18b3dbe05823eb90fdd010c5505c92) - configuration-guide โ add a how-to guide for uv integration ๐ง (PR#1214 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1214, commitde62334โhttps://github.com/python-semantic-release/python-semantic-release/commit/de623344cd18b3dbe05823eb90fdd010c5505c92) - github-actions โ clarify the
root_optionsv10 migration change with examples ๐ (PR#1271 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1271, commitfbb63ecโhttps://github.com/python-semantic-release/python-semantic-release/commit/fbb63ec76142ea903d8a0401369ec251abbec0fe)
โ๏ธ Build System
- deps โ expand the
python-gitlabdependency so it includes v6.0.0 ๐ฆ (PR#1273 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1273, commit99fc9ccโhttps://github.com/python-semantic-release/python-semantic-release/commit/99fc9ccabbae9adf5646731591080366eacbe03c)
v10.0.2 (2025-05-26)
๐ชฒ Bug Fixes
- github-actions โ add a filesystem UID/GID fixer after the action workspace gets modified ๐ ๏ธ (PR#1262 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1262, commit93e23c8โhttps://github.com/python-semantic-release/python-semantic-release/commit/93e23c8993fe6f113095bfcd5089684f403cc6b9)
v10.0.1 (2025-05-25)
๐ชฒ Bug Fixes
- github-actions โ bump the github-actions dependency to v10.0.0 โฌ๏ธ (PR#1255 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1255, commit2803676โhttps://github.com/python-semantic-release/python-semantic-release/commit/2803676cf26c52177fa98d9144934853744a22bb)
v10.0.0 (2025-05-25)
โจ Features
- cmd-version โ enable the
version_variablesversion stamp of vars with double-equals โจ (PR#1244 โhttps://github.com/python-semantic-release/python-semantic-release/pull/1244, commit080e4bcโhttps://github.com/python-semantic-release/python-semantic-release/commit/080e4bcb14048a2dd10445546a7ee3159b3ab85c) - parser-conventional โ set the parser to evaluate all squashed commits by default ๐ซถ (commit
6fcdc99โhttps://github.com/python-semantic-release/python-semantic-release/commit/6fcdc99e9462b1186ea9488fc14e4e18f8c7fdb3) - parser-conventional โ set the parser to ignore merge commits by default ๐ (commit
59bf084โhttps://github.com/python-semantic-release/python-semantic-release/commit/59bf08440a15269afaac81d78dd03ee418f9fd6b) - parser-emoji โ set the parser to evaluate all squashed commits by default ๐ซถ (commit
514a922โhttps://github.com/python-semantic-release/python-semantic-release/commit/514a922fa87721e2500062dcae841bedd84dc1fe) - parser-emoji โ set the parser to ignore merge commits by default ๐ (commit
8a51525โhttps://github.com/python-semantic-release/python-semantic-release/commit/8a5152573b9175f01be06d0c4531ea0ca4de8dd4) - parser-scipy โ set the parser to evaluate all squashed commits by default ๐ซถ (commit
634fffeโhttps://github.com/python-semantic-release/python-semantic-release/commit/634fffea29157e9b6305b21802c78ac245454265) - parser-scipy โ set the parser to ignore merge commits by default ๐ (commit
d4f128eโhttps://github.com/python-semantic-release/python-semantic-release/commit/d4f128e75e33256c0163fbb475c7c41e18f65147)
๐ชฒ Bug Fixes
- changelog-md โ switch to 1-line descriptions in the markdown template, closes #733 โ
https://github.com/python-semantic-release/python-semantic-release/issues/733(commite7ac155โhttps://github.com/python-semantic-release/python-semantic-release/commit/e7ac155a91fc2e735d3cbf9b66fb4e5ff40a1466) - changelog-rst โ switch to 1-line descriptions in the default ReStructuredText template, closes #733 โ
https://github.com/python-semantic-release/python-semantic-release/issues/733(commit731466fโhttps://github.com/python-semantic-release/python-semantic-release/commit/731466fec4e06fe71f6c4addd4ae2ec2182ae9c1) - cli โ adjust the verbosity parameter so it enables silly-level logging ๐คช (commit
bd3e7bfโhttps://github.com/python-semantic-release/python-semantic-release/commit/bd3e7bfa86d53a03f03ac419399847712c523b02) - github-action โ resolve a command injection vulnerability in the action script ๐ฅ๐จ (commit
fb3da27โhttps://github.com/python-semantic-release/python-semantic-release/commit/fb3da27650ff15bcdb3b7badc919bd8a9a73238d) - parser-conventional โ remove breaking change footer messages from commit descriptions ๐งน (commit
b271cbbโhttps://github.com/python-semantic-release/python-semantic-release/commit/b271cbb2d3e8b86d07d1358b2e7424ccff6ae186) - parser-conventional โ remove issue footer messages from commit descriptions ๐งน (commit
b1bb0e5โhttps://github.com/python-semantic-release/python-semantic-release/commit/b1bb0e55910715754eebef6cb5b21ebed5ee8d68) - parser-conventional โ remove PR/MR references from the commit subject line ๐งน (commit
eed63faโhttps://github.com/python-semantic-release/python-semantic-release/commit/eed63fa9f6e762f55700fc85ef3ebdc0d3144f21) - parser-conventional โ remove release notice footer messages from commit descriptions ๐งน (commit
7e8dc13โhttps://github.com/python-semantic-release/python-semantic-release/commit/7e8dc13c0b048a95d01f7aecfbe4eeedcddec9a4) - parser-emoji โ remove issue footer messages from commit descriptions ๐งน (commit
b757603โhttps://github.com/python-semantic-release/python-semantic-release/commit/b757603e77ebe26d8a14758d78fd21163a9059b2) - parser-emoji โ remove PR/MR references from the commit subject line ๐งน (commit
16465f1โhttps://github.com/python-semantic-release/python-semantic-release/commit/16465f133386b09627d311727a6f8d24dd8f174f) parser-emojiโ Remove release notice footer messages from commit descriptions (b6307cb, https://github.com/python-semantic-release/python-semantic-release/commit/b6307cb649043bbcc7ad9f15ac5ac6728914f443)parser-scipyโ Remove issue footer messages from commit descriptions (3cfee76, https://github.com/python-semantic-release/python-semantic-release/commit/3cfee76032662bda6fbdd7e2585193213e4f9da2)parser-scipyโ Remove PR/MR references from commit subject line (da4140f, https://github.com/python-semantic-release/python-semantic-release/commit/da4140f3e3a2ed03c05064f35561b4584f517105)parser-scipyโ Remove release notice footer messages from commit descriptions (58308e3, https://github.com/python-semantic-release/python-semantic-release/commit/58308e31bb6306aac3a985af01eb779dc923d3f0)
๐ Documentation ๐
- Refactor documentation page navigation (
4e52f4b, https://github.com/python-semantic-release/python-semantic-release/commit/4e52f4bba46e96a4762f97d306f15ae52c5cea1b) algorithmโ Remove out-of-date algorithm description (6cd0fbe, https://github.com/python-semantic-release/python-semantic-release/commit/6cd0fbeb44e16d394c210216c7099afa51f5a4a3)commit-parsingโ Define limitation of revert commits with the scipy parser (5310d0c, https://github.com/python-semantic-release/python-semantic-release/commit/5310d0c700840538f27874394b9964bf09cd69b1)configurationโ Change default value forallow_zero_versionin the description (203d29d, https://github.com/python-semantic-release/python-semantic-release/commit/203d29d9d6b8e862eabe2f99dbd27eabf04e75e2)configurationโ Change the default for the base changelog'smask_initial_releasevalue (5fb02ab, https://github.com/python-semantic-release/python-semantic-release/commit/5fb02ab6e3b8278ecbf92ed35083ffb595bc19b8)configurationโ Change the default value forchangelog.modein the setting description (0bed906, https://github.com/python-semantic-release/python-semantic-release/commit/0bed9069df67ae806ad0a15f8434ac4efcc6ba31)configurationโ Updateversion_variablessection to include double-equals operand support (PR#1244, https://github.com/python-semantic-release/python-semantic-release/pull/1244,080e4bc, https://github.com/python-semantic-release/python-semantic-release/commit/080e4bcb14048a2dd10445546a7ee3159b3ab85c)contributingโ Refactor contributing & contributors layout (8bed5bc, https://github.com/python-semantic-release/python-semantic-release/commit/8bed5bcca4a5759af0e3fb24eadf14aa4e4f53c9)github-actionsโ Add reference to manual release workflow example (6aad7f1, https://github.com/python-semantic-release/python-semantic-release/commit/6aad7f17e64fb4717ddd7a9e94d2a730be6a3bd9)github-actionsโ Change recommended workflow to separate release from deploy (67b2ae0, https://github.com/python-semantic-release/python-semantic-release/commit/67b2ae0050cce540a4126fe280cca6dc4bcf5d3f)github-actionsโ Updatepython-semantic-release/publish-actionparameter notes (c4d45ec, https://github.com/python-semantic-release/python-semantic-release/commit/c4d45ec46dfa81f645c25ea18ffffe9635922603)github-actionsโ Update PSR action parameter documentation (a082896, https://github.com/python-semantic-release/python-semantic-release/commit/a08289693085153effdafe3c6ff235a1777bb1fa)upgradingโ Re-locate version upgrade guides into Upgrading PSR (a5f5e04, https://github.com/python-semantic-release/python-semantic-release/commit/a5f5e042ae9af909ee9e3ddf57c78adbc92ce378)upgrading-v10โ Added migration guide for v9 to v10 (4ea92ec, https://github.com/python-semantic-release/python-semantic-release/commit/4ea92ec34dcd45d8cbab24e38e55289617b2d728)
โ๏ธ Build System ๐ ๏ธ
depsโ Prevent update toclick@8.2.0(PR#1245, https://github.com/python-semantic-release/python-semantic-release/pull/1245,4aa6a6e, https://github.com/python-semantic-release/python-semantic-release/commit/4aa6a6edbff75889e09f32f7cba52cb90c9fb626)
โป๏ธ Refactoring ๐งน
configโ Changeallow_zero_versiondefault tofalse(c6b6eab, https://github.com/python-semantic-release/python-semantic-release/commit/c6b6eabbfe100d2c741620eb3fa12a382531fa94)configโ Changechangelog.default_templates.mask_initial_releasedefault totrue(0e114c3, https://github.com/python-semantic-release/python-semantic-release/commit/0e114c3458a24b87bfd2d6b0cd3f5cfdc9497084)configโ Changechangelog.modedefault toupdate(7d39e76, https://github.com/python-semantic-release/python-semantic-release/commit/7d39e7675f859463b54751d59957b869d5d8395c)
๐ฅ Breaking Changes ๐ฅ
See also: ๐ For a summarized walkthrough, check out our v10 migration guide ../upgrading/10-upgrade.html as well.
changelog-mdโ bestie, the default Markdown changelog template and the release notes template are not printing out the entire commit message contents anymore. It's giving โจ*subject line only*โจ now. Why? Because literally everyone was highkey begging for better formatted changelogs and asking for subject line only, so here we are. Originally, the whole decision to not hide commit subjects that were included in the commit body via thegit merge --squashcommand existed because PSR did not have another alternative. At this point though, all the built-in parsers can parse squashed commits and separate them out into their own entry on the changelog. So the default template no longer needs to write out the full commit body. See the commit parser options if you want to enable/disable parsing squash commits. ๐changelog-rstโ same energy for the default ReStructured changelog template: it will no longer print out the entire commit message contents, instead it will only print the commit subject line. This comes to meet the high demand of better formatted changelogs and requests for subject line only. Originally, it was a decision to not hide commit subjects that were included in the commit body via thegit merge --squashcommand and PSR did not have another alternative. At this point, all the built-in parsers have the ability to parse squashed commits and separate them out into their own entry on the changelog. Therefore, the default template no longer needs to write out the full commit body. See the commit parser options if you want to enable/disable parsing squash commits. ๐ฆconfigโ this release switches theallow_zero_versiondefault tofalse. The whole point is to encourage less0.xreleases as the default, and instead let the experienced developer choose when0.xis actually appropriate. There are way too many projects in the ecosystems that never leave0.xand that is problematic for the industry tools that help auto-update based on SemVer. We should strive for publishing usable tools and maintaining good forethought for when compatibility must break. If your configuration already sets theallow_zero_versionvalue, this change will have no effect on your project. If you want to use0.xversions from the start, then changeallow_zero_versiontotruein your configuration.configโ this release switches thechangelog.default_templates.mask_initial_releasedefault totrue. This change is intended to toggle better recommended outputs of the default changelog. Conceptually, the very first release is hard to describe โ one can only provide new features as nothing exists yet for the end user. No changelog should be written as there is no start point to compare the "changes" to. The recommendation instead is to only list a simple message as Initial Release. This is now the default for PSR when providing the very first release (no pre-existing tags) in the changelog and release notes. If your configuration already sets thechangelog.default_templates.mask_initial_releasevalue, then this change will have no effect on your project. If you do NOT want to mask the first release information, then setchangelog.default_templates.mask_initial_releasetofalsein your configuration.configโ this release switches thechangelog.modedefault toupdate. In this mode, if a changelog exists, PSR will update the changelog IF AND ONLY IF the configured insertion flag exists in the changelog. The Changelog output will remain unchanged if no insertion flag exists. The insertion flag may be configured with thechangelog.insertion_flagsetting. When upgrading to v10, you must add the insertion flag manually โ or you can just delete the changelog file and run PSR's changelog generation and it will rebuild the changelog (similar toinitmode) but it will add the insertion flag. If your configuration already sets thechangelog.modevalue, then this change will have no effect on your project. If you would rather the changelog be generated from scratch every release, than set thechangelog.modevalue toinitin your configuration. ๐ซถgithub-actionโ oof, okay, important one: theroot_optionsaction input parameter has been removed, because it created a command injection vulnerability for arbitrary code to execute within the container context of the GitHub action if a command injection code was provided as part of theroot_optionsparameter string. ๐ญ To eliminate the vulnerability, each relevant option that can be provided tosemantic-releasehas been individually added as its own parameter and will be processed individually to prevent command injection. Please review our Github Actions Configuration page to review the newly available configuration options that replace theroot_optionsparameter: https://github.com/python-semantic-release/python-semantic-release/blob/v10.0.0/docs/configuration/automatic-releases/github-actions.rstparser-conventionalโ any breaking change footer messages that the conventional commit parser detects will now be removed from thecommit.descriptions[]list but maintained in and only in thecommit.breaking_descriptions[]list. Previously, the descriptions included all text from the commit message but that was redundant as the default changelog now handles breaking change footers in its own section.parser-conventional,parser-emoji,parser-scipyโ any issue resolution footers that the parser detects will now be removed from thecommit.descriptions[]list. Previously, the descriptions included all text from the commit message, but now that the parser pulls out the issue numbers the numbers will be included in thecommit.linked_issuestuple for user extraction in any changelog generation. ๐parser-conventional,parser-emoji,parser-scipyโ ok so when the commit parser spots any release notice footer messages, those are now out ofcommit.descriptions[]entirely, and instead they're kept incommit.notices[]and only incommit.notices[]. Why the glow-up? Because the descriptions used to include literally all the text from the commit message and it was giving redundant โ since the default changelog handles release notice footers in its own lil section now. ๐parser-conventional,parser-emoji,parser-scipyโ so on some common VCSs like GitHub, a pull request or merge request number reference usually gets tacked onto the end of the subject line inside parentheses. PSR now looks for that reference and extracts it into thecommit.linked_merge_requestandcommit.linked_pull_requestattributes of a commit object. And since it's pulled out individually now, it's just cleaner to drop it from the first line of thecommit.descriptionslist (that's the subject line, bestie) so changelog macros don't have to replace the text โ they only append a PR/MR link to the end of the line. The reference keeps its PR/MR prefix indicator (#or!), obviously. ๐parser-conventional,parser-emoji,parser-scipyโcommit_parser_options.ignore_merge_commitsis now set totrueby default, no cap. The ignore-squash-commits feature dropped in v9.18.0 and at the time it was set tofalseto prevent unexpected results on a non-breaking update. What does ignoring merge commits do? It prevents extra unnecessary processing on a commit message that probably isn't gonna match a commit message syntax anyway. Most merge commits are syntactically pre-defined by Git or a Remote Version Control System (ex. GitHub, etc.) and do not follow a commit convention โ nor should they, fr fr. The bigger issue with merge commits is that they're ultimately a full copy of all the changes that were previously created and committed. The merge commit itself ensures the previous commit tree is maintained in history, so the commit message always exists. But if merge commits get parsed, it generally creates duplicate messages that end up in your changelog, which is less than desired in most cases, lowkey tragic. ๐ So: if you've previously used thechangelog.exclude_commit_patternsfunctionality to ignore merge commit messages, then you want this setting set totrueto improve parsing speed. You can also now remove the merge commit exclude pattern from the list as well, to improve parsing speed even more. And if this functionality is not desired, you'll need to update your configuration to change the new setting tofalse. ๐parser-conventional,parser-emoji,parser-scipyโcommit_parser_options.parse_squash_commitsis now set totrueby default too! The parse-squash-commits feature landed in v9.17.0 and was originally set tofalseto prevent unexpected results on a non-breaking update. It attempts to find additional commits of the same commit type within the body of a single commit message. When squash commits are found, Python Semantic Release will separate out each commit into its own artificial commit object and parse them individually. Heads up though โ this potentially can change the resulting version bump if a larger bump was detected within the squashed components. It also allows for the changelog and release notes to separately order and display each commit as originally written. If that's not what you want, you'll need to update your configuration to change the new setting tofalse. โญ
v9.21.2 (2026-07-04) ๐ฆ
๐ชฒ Bug Fixes
hvcs: Mask credentials in git URL debug logs, closes#1426(PR#1450,da0cb2b)
๐ Documentation
github-actions: Fix recommended upstream detection script's upstream name parsing (911f62a)
โ๏ธ Build System
- Mark for Python 3.14 compatibility (
86c0439) deps: Bumptomlkitdependency from~=0.11.0to~=0.13.0(5395d06)deps: Prevent update toclick@8.2.0(128f06a)
v9.21.1 (2025-05-05) ๐ง
๐ชฒ Bug Fixes
changelog-filters: Fixes url resolution when prefix & path share letters, closes#1204(PR#1239,f61f8a3)
๐ Documentation
github-actions: Expound on monorepo example to include publishing actions (PR#1229,550e85f)
โ๏ธ Build System
deps: Bumprichdependency from13.0to14.0(PR#1224,691536e)deps: Expandpython-gitlabdependency to include v5.0.0 (PR#1228,a0cd1be)
v9.21.0 (2025-02-23) ๐
โจ Features
- Add package name variant,
python-semantic-release, project script, closes#1195(PR#1199,1ac97bc)
๐ Documentation
github-actions: Update example workflow to handle rapid merges (PR#1200,1a4116a)
v9.20.0 (2025-02-17) ๐
โจ Features
cmd-version: Enable stamping of tag formatted versions into files, closes#846(PR#1190,8906d8e)cmd-version: Extendversion_variablesto stamp versions with@symbol separator, closes#1156(PR#1185,23f69b6)
๐ Documentation
configuration: Add usage information for tag format version stamping (PR#1190,8906d8e)configuration: Clarifyversion_variablesconfig description &@separator usage (PR#1185,23f69b6)
โ๏ธ Build System
deps: Adddeprecated~=1.2for deprecation notices & sphinx documentation (PR#1190,8906d8e)
v9.19.1 (2025-02-11) ๐
๐ชฒ Bug Fixes
changelog: Standardize heading format for across all version sections (PR#1182,81f9e80)changelog-md: Standardize heading format for extra release information (PR#1182,81f9e80)changelog-rst: Standardize heading format for extra release information (PR#1182,81f9e80)config: Handle invalidcommit_parsertype gracefully (PR#1180,903c8ba)release-notes: Standardize heading format for extra release information (PR#1182,81f9e80)
๐ Documentation
- Fix spelling errors & inaccurate descriptions (
55d4a05) automatic-releases: Declutter the table of contents for automatic release guides (e8343ee)commit-parsingโ updated the reference to the section name of the additional release info ๐ซถ (PR#1182https://github.com/python-semantic-release/python-semantic-release/pull/1182, commit81f9e80https://github.com/python-semantic-release/python-semantic-release/commit/81f9e80c3df185ef5e553e024b903ce153e14304)
๐ v9.19.0 (2025-02-10)
โจ Features
parser-conventionalโ added the actual official conventional-commits parser, no cap ๐ (PR#1177https://github.com/python-semantic-release/python-semantic-release/pull/1177, commit27ddf84https://github.com/python-semantic-release/python-semantic-release/commit/27ddf840f8c812361c60bac9cf0b110d401f33d6)
๐ Documentation
- updated the references so they point at the Conventional Commit Parser instead of the Angular parser, we stay current bestie ๐
(PR#1177
https://github.com/python-semantic-release/python-semantic-release/pull/1177, commit27ddf84https://github.com/python-semantic-release/python-semantic-release/commit/27ddf840f8c812361c60bac9cf0b110d401f33d6)
๐ก Additional Release Information
parser-conventional: heads up!! The'angular'commit parser has been renamed to'conventional', because that's what it literally evolved into to match the official conventional-commits standard. Please update your configs socommit_parsersays'conventional'where you used to write'angular'. And fr fr: the'angular'type will be removed in v11 ๐ซฃ
๐ฆ v9.18.1 (2025-02-08)
๐ชฒ Bug Fixes
configโ refactored the default token resolution so it stops throwing a pre-mature insecure URL error, closes #1074https://github.com/python-semantic-release/python-semantic-release/issues/1074, #1169https://github.com/python-semantic-release/python-semantic-release/issues/1169๐ฎโ๐จ (PR#1173https://github.com/python-semantic-release/python-semantic-release/pull/1173, commit37db258https://github.com/python-semantic-release/python-semantic-release/commit/37db2581620ad02e66716a4b3b365aa28abe65f8)
๐ v9.18.0 (2025-02-06)
โจ Features
- added the
create_release_url&format_w_official_vcs_namefilters, iconic behaviour honestly โจ (PR#1161https://github.com/python-semantic-release/python-semantic-release/pull/1161, commitf853cf0https://github.com/python-semantic-release/python-semantic-release/commit/f853cf059b3323d7888b06fde09142184e7964e8) changelogโ added thecreate_pypi_urlfilter to the jinja template render context ๐ (PR#1160https://github.com/python-semantic-release/python-semantic-release/pull/1160, commit45d49c3https://github.com/python-semantic-release/python-semantic-release/commit/45d49c3da75a7f08c86fc9bab5d232a9b37d9e72)changelogโ added additional release info to the changelog straight from commitNOTICE's ๐ (PR#1166https://github.com/python-semantic-release/python-semantic-release/pull/1166, commit834ce32https://github.com/python-semantic-release/python-semantic-release/commit/834ce323007c58229abf115ef2016a348de9ee66)changelog-mdโ added an additional release info section to the default markdown template, closes #223https://github.com/python-semantic-release/python-semantic-release/issues/223๐ (PR#1166https://github.com/python-semantic-release/python-semantic-release/pull/1166, commit834ce32https://github.com/python-semantic-release/python-semantic-release/commit/834ce323007c58229abf115ef2016a348de9ee66)changelog-rstโ added an additional release info section to the default ReStructuredText template, closes #223https://github.com/python-semantic-release/python-semantic-release/issues/223๐ธ (PR#1166https://github.com/python-semantic-release/python-semantic-release/pull/1166, commit834ce32https://github.com/python-semantic-release/python-semantic-release/commit/834ce323007c58229abf115ef2016a348de9ee66)commit-parserโ enabled parsers to identify additional release notices from commit msgs, the way that this just works ๐ง (PR#1166https://github.com/python-semantic-release/python-semantic-release/pull/1166, commit834ce32https://github.com/python-semantic-release/python-semantic-release/commit/834ce323007c58229abf115ef2016a348de9ee66)parser-angularโ added anignore_merge_commitsoption so you can discard parsing merge commits entirely ๐ซ (PR#1164https://github.com/python-semantic-release/python-semantic-release/pull/1164, commit463e43bhttps://github.com/python-semantic-release/python-semantic-release/commit/463e43b897ee80dfaf7ce9d88d22ea8e652bcf55)parser-angularโ added functionality to parse outNOTICE:prefixed statements in commits, closes #223https://github.com/python-semantic-release/python-semantic-release/issues/223๐ (PR#1166https://github.com/python-semantic-release/python-semantic-release/pull/1166, commit834ce32https://github.com/python-semantic-release/python-semantic-release/commit/834ce323007c58229abf115ef2016a348de9ee66)parser-emojiโ added anignore_merge_commitsoption to discard parsing merge commits ๐ (PR#1164https://github.com/python-semantic-release/python-semantic-release/pull/1164, commit463e43bhttps://github.com/python-semantic-release/python-semantic-release/commit/463e43b897ee80dfaf7ce9d88d22ea8e652bcf55)parser-emojiโ added functionality to parse outNOTICE:prefixed statements in commits, closes #223https://github.com/python-semantic-release/python-semantic-release/issues/223๐ (PR#1166https://github.com/python-semantic-release/python-semantic-release/pull/1166, commit834ce32https://github.com/python-semantic-release/python-semantic-release/commit/834ce323007c58229abf115ef2016a348de9ee66)parsersโ added the optionignore_merge_commitsto discard parsing merge commits, one option to rule them all ๐ (PR#1164https://github.com/python-semantic-release/python-semantic-release/pull/1164, commit463e43bhttps://github.com/python-semantic-release/python-semantic-release/commit/463e43b897ee80dfaf7ce9d88d22ea8e652bcf55)release-notesโ added license information to the default release notes template, closes #228https://github.com/python-semantic-release/python-semantic-release/issues/228โญ (PR#1167https://github.com/python-semantic-release/python-semantic-release/pull/1167, commit41172c1https://github.com/python-semantic-release/python-semantic-release/commit/41172c1272a402e94e3c68571d013cbdcb5b9023)vcs-bitbucketโ added theformat_w_official_vcs_namefilter function ๐ฅ (PR#1161https://github.com/python-semantic-release/python-semantic-release/pull/1161, commitf853cf0https://github.com/python-semantic-release/python-semantic-release/commit/f853cf059b3323d7888b06fde09142184e7964e8)vcs-giteaโ added thecreate_release_url&format_w_official_vcs_namefilter functions ๐ (PR#1161https://github.com/python-semantic-release/python-semantic-release/pull/1161, commitf853cf0https://github.com/python-semantic-release/python-semantic-release/commit/f853cf059b3323d7888b06fde09142184e7964e8)vcs-githubโ added thecreate_release_url&format_w_official_vcs_namefilter functions ๐ (PR#1161https://github.com/python-semantic-release/python-semantic-release/pull/1161, commitf853cf0https://github.com/python-semantic-release/python-semantic-release/commit/f853cf059b3323d7888b06fde09142184e7964e8)vcs-gitlabโ added thecreate_release_url&format_w_official_vcs_namefilter functions ๐ฆ (PR#1161https://github.com/python-semantic-release/python-semantic-release/pull/1161, commitf853cf0https://github.com/python-semantic-release/python-semantic-release/commit/f853cf059b3323d7888b06fde09142184e7964e8)
๐ชฒ Bug Fixes
- refactored the parsing compatibility function so it supports older custom parsers, we love backwards compat in this house ๐ญ (PR#1165
https://github.com/python-semantic-release/python-semantic-release/pull/1165, commitcf340c5https://github.com/python-semantic-release/python-semantic-release/commit/cf340c5256dea58aedad71a6bdf50b17eee53d2f) changelogโ fixed parsing compatibility w/ custom parsers, closes #1162https://github.com/python-semantic-release/python-semantic-release/issues/1162๐ซถ (PR#1165https://github.com/python-semantic-release/python-semantic-release/pull/1165, commitcf340c5https://github.com/python-semantic-release/python-semantic-release/commit/cf340c5256dea58aedad71a6bdf50b17eee53d2f)changelog-templatesโ adjusted the default templates so they stop producing empty version sections, thank u ๐ (PR#1164https://github.com/python-semantic-release/python-semantic-release/pull/1164, commit463e43bhttps://github.com/python-semantic-release/python-semantic-release/commit/463e43b897ee80dfaf7ce9d88d22ea8e652bcf55)parser-angularโ adjusted the parser to prevent empty message extractions ๐ (PR#1166https://github.com/python-semantic-release/python-semantic-release/pull/1166, commit834ce32https://github.com/python-semantic-release/python-semantic-release/commit/834ce323007c58229abf115ef2016a348de9ee66)parser-emojiโ adjusted the parser to prevent empty message extractions ๐ต (PR#1166https://github.com/python-semantic-release/python-semantic-release/pull/1166, commit834ce32https://github.com/python-semantic-release/python-semantic-release/commit/834ce323007c58229abf115ef2016a348de9ee66)versionโ fixed parsing compatibility w/ custom parsers, closes #1162https://github.com/python-semantic-release/python-semantic-release/issues/1162๐ (PR#1165https://github.com/python-semantic-release/python-semantic-release/pull/1165, commitcf340c5https://github.com/python-semantic-release/python-semantic-release/commit/cf340c5256dea58aedad71a6bdf50b17eee53d2f)
๐ Documentation
changelogโ added the formatted changelog into the hosted documentation ๐ (PR#1155https://github.com/python-semantic-release/python-semantic-release/pull/1155, commit2f18a6dhttps://github.com/python-semantic-release/python-semantic-release/commit/2f18a6debfa6ef3afcc5611a3e09262998f2d4bf)changelog-templatesโ added a description for the newcreate_pypi_urlfilter function ๐ (PR#1160https://github.com/python-semantic-release/python-semantic-release/pull/1160, commit45d49c3https://github.com/python-semantic-release/python-semantic-release/commit/45d49c3da75a7f08c86fc9bab5d232a9b37d9e72)changelog-templatesโ added details about license specification in the release notes โญ (PR#1167https://github.com/python-semantic-release/python-semantic-release/pull/1167, commit41172c1https://github.com/python-semantic-release/python-semantic-release/commit/41172c1272a402e94e3c68571d013cbdcb5b9023)changelog-templatesโ defined thecreate_release_url&format_w_official_vcs_namefilters ๐ (PR#1161https://github.com/python-semantic-release/python-semantic-release/pull/1161, commitf853cf0https://github.com/python-semantic-release/python-semantic-release/commit/f853cf059b3323d7888b06fde09142184e7964e8)changelog-templatesโ finally documented the special separate sections of commit descriptions ๐commit-parsingโ wrote up the new release notice footer detection feature of the built-in parsers, lowkey a big deal
v9.17.0 (2025-01-26)
โจ Features
changelogโ added thesort_numericallyfilter function to the template environmentchangelogโ squashed commits get parsed individually now โจconfigโ extended support of remote urls aliased usinggitinsteadOfconfigurations, closes #1150- #1150 โ
https://github.com/python-semantic-release/python-semantic-release/issues/1150 - PR#1151 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1151 4045037โhttps://github.com/python-semantic-release/python-semantic-release/commit/40450375c7951dafddb09bef8001db7180d95f3a
- #1150 โ
parsersโ squashed commits get parsed individually, yup same energy as aboveparser-angularโ applies PR/MR numbers to all parsed commits from a squash merge, the way it should be honestlyparser-angularโ upgraded the angular parser so it parses squashed commits individually, closes #1085- #1085 โ
https://github.com/python-semantic-release/python-semantic-release/issues/1085 - PR#1112 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1112 cf785caโhttps://github.com/python-semantic-release/python-semantic-release/commit/cf785ca79a49eb4ee95c148e0ae6a19e230e915c
- #1085 โ
parser-emojiโ added functionality to interpret scopes from gitmoji commit messages ๐parser-emojiโ upgraded the emoji parser so it parses squashed commits individuallyversionโ parses squashed commits individually, no cap
๐ชฒ Bug Fixes
github-actionโ disabled writing python bytecode during action execution
โก Performance Improvements
loggingโ yeeted the irrelevant debug logging statements ๐๏ธ
๐ Documentation
changelog-templatesโ added a description for the newsort_numericallyfilter functioncommit-parsingโ added a description for the squash commit evaluation option of the default parsersconfigurationโ updated thecommit_parser_optionssetting description
v9.16.1 (2025-01-12)
๐ชฒ Bug Fixes
parser-customโ handles relative parent directory paths to the module file way better now
๐ Documentation
github-actionsโ updated the PSR versions in the github workflow examples
v9.16.0 (2025-01-12)
โจ Features
configโ expanded dynamic parser import so it can handle a filepath to a module ๐ฅ
๐ชฒ Bug Fixes
changelogโ fixes PSR release commit exclusions for customized commit messagescmd-versionโ fixes the--print-tagresult so it actually matches the configured tag formatcmd-versionโ fixes the tag format on the default version when force bumping for an initial release, closes #1137- #1137 โ
https://github.com/python-semantic-release/python-semantic-release/issues/1137 - PR#1138 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1138 007fd00โhttps://github.com/python-semantic-release/python-semantic-release/commit/007fd00a3945ed211ece4baab0b79ad93dc018f5
- #1137 โ
config-changelogโ validateschangelog.exclude_commit_patternswhen the config loads
๐ Documentation
commit-parsingโ added the new custom parser import spec description for direct path imports, closes #687- #687 โ
https://github.com/python-semantic-release/python-semantic-release/issues/687 - PR#1135 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1135 0418fd8โhttps://github.com/python-semantic-release/python-semantic-release/commit/0418fd8d27aac14925aafa50912e751e3aeff2f7
- #687 โ
configurationโ adjusted thecommit_parseroption definition for direct path imports
v9.15.2 (2024-12-16)
๐ชฒ Bug Fixes
changelogโ makes sure user rendered files get trimmed to end with a single newlinecliโ added an error message telling you how to gather the full error outputcmd-versionโ enables maintenance prereleases ๐cmd-versionโ fixed the handling of multiple prerelease token variants & git flow mergescmd-versionโ fixed the version determination algorithm so it captures commits across merged branchescmd-versionโ forces the tag timestamp to be the same time as the release commit, chef's kisscmd-versionโ handles multiple prerelease token variants properly, closes #789- #789 โ
https://github.com/python-semantic-release/python-semantic-release/issues/789 - PR#1120 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1120 8784b9aโhttps://github.com/python-semantic-release/python-semantic-release/commit/8784b9ad4bc59384f855b5af8f1b8fb294397595
- #789 โ
configโ makes sure the default config loads on network mounted windows environments, closes #1123- #1123 โ
https://github.com/python-semantic-release/python-semantic-release/issues/1123 - PR#1124 โ
https://github.com/python-semantic-release/python-semantic-release/pull/1124 a64cbc9โhttps://github.com/python-semantic-release/python-semantic-release/commit/a64cbc96c110e32f1ec5d1a7b61e950472491b87
- #1123 โ
versionโ Remove some excessive log msgs from debug to silly level (PR#1120https://github.com/python-semantic-release/python-semantic-release/pull/1120,8784b9ahttps://github.com/python-semantic-release/python-semantic-release/commit/8784b9ad4bc59384f855b5af8f1b8fb294397595)version-bumpโ Increment based on current commit's history only, closes #861 (https://github.com/python-semantic-release/python-semantic-release/issues/861) (PR#864https://github.com/python-semantic-release/python-semantic-release/pull/864,b88108ehttps://github.com/python-semantic-release/python-semantic-release/commit/b88108e189e1894e36ae4fdf8ad8a382b5c8c90a)
โก Performance Improvements
cmd-versionโ Refactor version determination algorithm for accuracy & speed โจ (PR#1120https://github.com/python-semantic-release/python-semantic-release/pull/1120,8784b9ahttps://github.com/python-semantic-release/python-semantic-release/commit/8784b9ad4bc59384f855b5af8f1b8fb294397595)
v9.15.1 (2024-12-03)
๐ชฒ Bug Fixes
changelog-mdโ Fix commit sort of breaking descriptions section (75b342ehttps://github.com/python-semantic-release/python-semantic-release/commit/75b342e6259412cb82d8b7663e5ee4536d14f407)parser-angularโ Ensure issues are sorted by numeric value rather than text sorted (3858addhttps://github.com/python-semantic-release/python-semantic-release/commit/3858add582fe758dc2ae967d0cd051d43418ecd0)parser-emojiโ Ensure issues are sorted by numeric value rather than text sorted (7b8d2d9https://github.com/python-semantic-release/python-semantic-release/commit/7b8d2d92e135ab46d1be477073ccccc8c576f121)
v9.15.0 (2024-12-02)
โจ Features
changelog-mdโ Add a breaking changes section to default Markdown template, closes #244 (https://github.com/python-semantic-release/python-semantic-release/issues/244) (PR#1110https://github.com/python-semantic-release/python-semantic-release/pull/1110,4fde30ehttps://github.com/python-semantic-release/python-semantic-release/commit/4fde30e0936ecd186e448f1caf18d9ba377c55ad)changelog-mdโ Alphabetize breaking change descriptions in markdown changelog template (PR#1110https://github.com/python-semantic-release/python-semantic-release/pull/1110,4fde30ehttps://github.com/python-semantic-release/python-semantic-release/commit/4fde30e0936ecd186e448f1caf18d9ba377c55ad)changelog-mdโ Alphabetize commit summaries & scopes in markdown changelog template (PR#1111https://github.com/python-semantic-release/python-semantic-release/pull/1111,8327068https://github.com/python-semantic-release/python-semantic-release/commit/83270683fd02b626ed32179d94fa1e3c7175d113)changelog-rstโ Add a breaking changes section to default reStructuredText template, closes #244 (https://github.com/python-semantic-release/python-semantic-release/issues/244) (PR#1110https://github.com/python-semantic-release/python-semantic-release/pull/1110,4fde30ehttps://github.com/python-semantic-release/python-semantic-release/commit/4fde30e0936ecd186e448f1caf18d9ba377c55ad)changelog-rstโ Alphabetize breaking change descriptions in ReStructuredText template (PR#1110https://github.com/python-semantic-release/python-semantic-release/pull/1110,4fde30ehttps://github.com/python-semantic-release/python-semantic-release/commit/4fde30e0936ecd186e448f1caf18d9ba377c55ad)changelog-rstโ Alphabetize commit summaries & scopes in ReStructuredText template (PR#1111https://github.com/python-semantic-release/python-semantic-release/pull/1111,8327068https://github.com/python-semantic-release/python-semantic-release/commit/83270683fd02b626ed32179d94fa1e3c7175d113)commit-parserโ Enable parsers to flag commit to be ignored for changelog, closes #778 (https://github.com/python-semantic-release/python-semantic-release/issues/778) (PR#1108https://github.com/python-semantic-release/python-semantic-release/pull/1108,0cc668chttps://github.com/python-semantic-release/python-semantic-release/commit/0cc668c36490401dff26bb2c3141f6120a2c47d0)default-changelogโ Add a separate formatted breaking changes section, closes #244 (https://github.com/python-semantic-release/python-semantic-release/issues/244) (PR#1110https://github.com/python-semantic-release/python-semantic-release/pull/1110,4fde30ehttps://github.com/python-semantic-release/python-semantic-release/commit/4fde30e0936ecd186e448f1caf18d9ba377c55ad)default-changelogโ Alphabetize commit summaries & scopes in change sections (PR#1111https://github.com/python-semantic-release/python-semantic-release/pull/1111,8327068https://github.com/python-semantic-release/python-semantic-release/commit/83270683fd02b626ed32179d94fa1e3c7175d113)parsersโ Add other_allowed_tags option for commit parser options (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)parsersโ Enable parsers to identify linked issues on a commit (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)parser-angularโ Automatically parse angular issue footers from commit messages (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)parser-customโ Enable custom parsers to identify linked issues on a commit (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)parser-emojiโ Parse issue reference footers from commit messages (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)release-notesโ Add tag comparison link to release notes when supported (PR#1107https://github.com/python-semantic-release/python-semantic-release/pull/1107,9073344https://github.com/python-semantic-release/python-semantic-release/commit/9073344164294360843ef5522e7e4c529985984d)
๐ชฒ Bug Fixes
cmd-versionโ Ensure release utilizes a timezone aware datetime (ca817edhttps://github.com/python-semantic-release/python-semantic-release/commit/ca817ed9024cf84b306a047675534cc36dc116b2)default-changelogโ Alphabetically sort commit descriptions in version type sections (bdaaf5ahttps://github.com/python-semantic-release/python-semantic-release/commit/bdaaf5a460ca77edc40070ee799430122132dc45)utilโ Prevent git footers from being collapsed during parse (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)
๐ Documentation
api-parsersโ Add option documentation to parser options (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)changelog-templatesโ Update examples using new commit.linked_issues attribute (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)commit-parsingโ Improve & expand commit parsing w/ parser descriptions (PR#1109https://github.com/python-semantic-release/python-semantic-release/pull/1109,f90b8dchttps://github.com/python-semantic-release/python-semantic-release/commit/f90b8dc6ce9f112ef2c98539d155f9de24398301)
v9.14.0 (2024-11-11)
โจ Features
changelogโ Add md to rst conversion for markdown inline links (cb2af1fhttps://github.com/python-semantic-release/python-semantic-release/commit/cb2af1f17cf6c8ae037c6cd8bb8b4d9c019bb47e)changelogโ Define first release w/o change descriptions for default MD template (fa89dechttps://github.com/python-semantic-release/python-semantic-release/commit/fa89dec239efbae7544b187f624a998fa9ecc309)changelogโ Define first release w/o change descriptions for default RST template (e30c94bhttps://github.com/python-semantic-release/python-semantic-release/commit/e30c94bffe62b42e8dc6ed4fed6260e57b4d532b)changelogโ Prefix scopes on commit descriptions in default template (PR#1093https://github.com/python-semantic-release/python-semantic-release/pull/1093,560fd2chttps://github.com/python-semantic-release/python-semantic-release/commit/560fd2c0d58c97318377cb83af899a336d24cfcc)changelog-mdโ Add markdown inline link format macro (c6d8211https://github.com/python-semantic-release/python-semantic-release/commit/c6d8211c859442df17cb41d2ff19fdb7a81cdb76)changelog-mdโ Prefix scopes on commit descriptions in Markdown changelog template (PR#1093https://github.com/python-semantic-release/python-semantic-release/pull/1093,560fd2chttps://github.com/python-semantic-release/python-semantic-release/commit/560fd2c0d58c97318377cb83af899a336d24cfcc)changelog-rstโ Prefix scopes on commit descriptions in ReStructuredText template (PR#1093https://github.com/python-semantic-release/python-semantic-release/pull/1093,560fd2chttps://github.com/python-semantic-release/python-semantic-release/commit/560fd2c0d58c97318377cb83af899a336d24cfcc)configurationโ Addchangelog.default_templates.mask_initial_releaseoption (595a70bhttps://github.com/python-semantic-release/python-semantic-release/commit/595a70bcbc8fea1f8ccf6c5069c41c35ec4efb8d)contextโ Addmask_initial_releasesetting to changelog context (6f2ee39https://github.com/python-semantic-release/python-semantic-release/commit/6f2ee39414b3cf75c0b67dee4db0146bbc1041bb)release-notes: makes the very first release actually DEFINE itself even when there are zero change descriptions in the default template โจ (83167a3ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/83167a3dcceb7db16b790e1b0efd5fc75fee8942)
๐ชฒ Bug Fixes
release-notes: overrides the default word-wrap so the default template justโฆ doesn't wrap, bestie, no cap (99ab99bยทhttps://github.com/python-semantic-release/python-semantic-release/commit/99ab99bb0ba350ca1913a2bde9696f4242278972)
๐ Documentation
changelog-templates: documents the shiny newmask_initial_releasechangelog context variable, iconic behavior fr (f294957ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/f2949577dfb2dbf9c2ac952c1bbcc4ab84da080b)configuration: documents how the newmask_initial_releaseoption gets used and what it actually does to your changelog ๐ (3cabcdcยทhttps://github.com/python-semantic-release/python-semantic-release/commit/3cabcdcd9473e008604e74cc2d304595317e921d)homepage: fixes the reference to the new CI workflow for the test status badge, the way it was pointing at the wrong thing before ๐ญ (6760069ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/6760069e7489f50635beb5aedbbeb2cb82b7c584)
v9.13.0 (2024-11-10)
โจ Features
changelog: adds PR/MR url linking to the default Markdown changelog, closes #924, #953 ๐ฅ (cd8d131ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/cd8d1310a4000cc79b529fbbdc58933f4c6373c6)changelog: same glow-up but for the default reStructuredText template, PR/MR url linking has arrived, closes #924, #953 ๐ (5f018d6ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/5f018d630b4c625bdf6d329b27fd966eba75b017)parsed-commit: adds a linked merge requests list right onto theParsedCommitobject, she's got range now (9a91062ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/9a9106212d6c240e9d3358e139b4c4694eaf9c4b)parser-angular: automatically parses PR/MR numbers straight out of the subject lines in your commits, no manual labour periodt (2ac798fยทhttps://github.com/python-semantic-release/python-semantic-release/commit/2ac798f92e0c13c1db668747f7e35a65b99ae7ce)parser-emoji: automatically parses PR/MR numbers from subject lines in commits too, equal opportunity parsing ๐ฆ (bca9909ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/bca9909c1b61fdb1f9ccf823fceb6951cd059820)parser-scipy: yup, automatically parses PR/MR numbers from subject lines in commits as well, unmatched energy โจ (2b3f738ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/2b3f73801f5760bac29acd93db3ffb2bc790cda0)
๐ชฒ Bug Fixes
changelog-rst: ignores unknown parsed commit types in the default RST changelog instead of having a meltdown over them ๐ (77609b1ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/77609b1917a00b106ce254e6f6d5edcd1feebba7)parser-angular: drops the breaking category but still maintains a major level bump โ breaking changes stay major, the label just dips (f1ffa54ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/f1ffa5411892de34cdc842fd55c460a24b6685c6)parsers: improves the reliability of descriptions after a reverse word-wrap, because mangled descriptions are NOT the vibe ๐ (436374bยทhttps://github.com/python-semantic-release/python-semantic-release/commit/436374b04128d1550467ae97ba90253f1d1b3878)
โก Performance Improvements
parser-angular: simplifies the commit parsing type pre-calculation, less math, more speed (a86a28cยทhttps://github.com/python-semantic-release/python-semantic-release/commit/a86a28c5e26ed766cda71d26b9382c392e377c61)parser-emoji: increases the speed of commit parsing, zoom zoom ๐ (2c9c468ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/2c9c4685a66feb35cd78571cf05f76344dd6d66a)parser-scipy: increases speed & decreases complexity of commit parsing, she's efficient AND slaying (2b661edยทhttps://github.com/python-semantic-release/python-semantic-release/commit/2b661ed122a6f0357a6b92233ac1351c54c7794e)
๐ Documentation
changelog-templates: adds thelinked_merge_requestfield to the examples, so you can actually see it (d4376bcยทhttps://github.com/python-semantic-release/python-semantic-release/commit/d4376bc2ae4d3708d501d91211ec3ee3a923e9b5)changelog-templates: fixes the api class reference links, they were lowkey broken (7a5bdf2ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/7a5bdf29b3df0f9a1346ea5301d2a7fee953667b)commit-parsing: adds thelinked_merge_requestfield to the Parsed Commit definition, documenting the whole thing properly ๐ (ca61889ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/ca61889d4ac73e9864fbf637fb87ab2d5bc053ea)
v9.12.2 (2024-11-07)
๐ชฒ Bug Fixes
bitbucket: fixes thepull_request_urlfilter so it gracefully ignores a PR prefix instead of going feral (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)cli: gracefully captures ALL exceptions unless you're in very verbose debug mode, so no more scary tracebacks unless you asked ๐ (PR#1088ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1088,13ca44fยทhttps://github.com/python-semantic-release/python-semantic-release/commit/13ca44f4434098331f70e6937684679cf1b4106a)gitea: fixes theissue_urlfilter to ignore an issue prefix gracefully (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)gitea: fixes thepull_request_urlfilter to ignore an PR prefix gracefully (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)github: fixes theissue_urlfilter to ignore an issue prefix gracefully (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)github: fixes thepull_request_urlfilter to ignore an PR prefix gracefully (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)gitlab: fixes theissue_urlfilter to ignore an issue prefix gracefully (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)gitlab: fixes themerge_request_urlfilter to ignore an PR prefix gracefully (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)hvcs: adds flexibility to the issue & MR/PR url jinja filters, she's bendy now ๐ง (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)
๐ Documentation
changelog-templates: updates the descriptions of the issue & MR/PR url jinja filters, so the docs actually match reality (PR#1089ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1089,275ec88ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/275ec88e6d1637c47065bb752a60017ceba9876c)
v9.12.1 (2024-11-06)
๐ชฒ Bug Fixes
changelog: fixes the raw-inline pattern replacement in theconvert_md_to_rstfilter, that conversion was eating its own tail ๐ญ (2dc70a6ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/2dc70a6106776106b0fba474b0029071317d639f)cmd-version: fixes--as-prereleasewhen there's no commit change from the last full release, sneaky little edge case (PR#1076ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1076,3b7b772ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/3b7b77246100cedd8cc8f289395f7641187ffdec)release-notes: adds the context variable shorthandctxโ like the docs claim and the changelog already has, consistency slay (d618d83ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/d618d83360c4409fc149f70b97c5fe338fa89968)
๐ Documentation
contributing: updates the local testing instructions so you can actually run stuff on your own machine ๐ซถ (74f03d4ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/74f03d44684b7b2d84f9f5e471425b02f8bf91c3)
v9.12.0 (2024-10-18)
โจ Features
changelog: adds theautofit_text_widthfilter to the template environment, closes nothing but looks gorgeous (PR#1062ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1062,83e4b86ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/83e4b86abd4754c2f95ec2e674f04deb74b9a1e6)
๐ชฒ Bug Fixes
changelog: ignores commit exclusion when a commit actually causes a version bump โ if it moves the version, it shows up, no hiding ๐ (e8f886eยทhttps://github.com/python-semantic-release/python-semantic-release/commit/e8f886ef2abe8ceaea0a24a0112b92a167abd6a9)parser-angular: changes theFixescommit type heading toBug Fixes, we're being consistent bestie (PR#1064ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1064,09e3a4dยทhttps://github.com/python-semantic-release/python-semantic-release/commit/09e3a4da6237740de8e9932d742b18d990e9d079)parser-emoji: enables the default bump level option, it was just sitting there off ๐ญ (bc27995ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/bc27995255a96b9d6cc743186e7c35098822a7f6)
๐ Documentation
changelog-templates: adds the definition & usage of theautofit_text_widthtemplate filter, so you know what it do โจ (PR#1062ยทhttps://github.com/python-semantic-release/python-semantic-release/pull/1062,83e4b86ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/83e4b86abd4754c2f95ec2e674f04deb74b9a1e6)commit-parsers: adds a deprecation message for the tag parser โ heads up, she's on her way out ๐ (af94540ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/af94540f2b1c63bf8a4dc977d5d0f66176962b64)configuration: adds a deprecation message for the tag parser here too, double the notice, double the warning ๐ (a83b7e4ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/a83b7e43e4eaa99790969a6c85f44e01cde80d0a)
So for the changelog part I'm putting each release's full URLs in a lil "receipts" list at the end of that version, so the bullets stay readable but not a single character goes missing, bestie ๐
v9.11.1 (2024-10-15)
๐ชฒ Bug Fixes
changelogโ custom templates used to have a whole meltdown when the components they were pulling in lived inside hidden folders ๐ that error era is OVER (like, no cap), it's fixed now (PR#1060,a7614b0)
๐ the receipts
PR#1060โhttps://github.com/python-semantic-release/python-semantic-release/pull/1060a7614b0โhttps://github.com/python-semantic-release/python-semantic-release/commit/a7614b0db8ce791e4252209e66f42b5b5275dffd
v9.11.0 (2024-10-12)
โจ Features
changelogโ new filter calledconvert_md_to_rsthas entered the changelog environment chat ๐ it converts yer markdown to reStructuredText, slay (PR#1055,c2e8831)changelogโ there's now a default changelog in re-structured text format, and this one closes #399 like it was born to do it ๐ (PR#1055,c2e8831)changelogโ brand new default changelog template, written in reStructuredText format, fresh out the box โจ (PR#1055,c2e8831)configโ the defaultchangelog.insertion_flagnow gets enabled based on whatever output format you're using ๐ฆ it just knows (PR#1055,c2e8831)configโ name your target changelog filename and it'll trigger RST output format all by itself, which also closes #399 ๐ฅ (PR#1055,c2e8831)
๐ชฒ Bug Fixes
changelogโ spacing for the default markdown template during updates is fixed, because wonky spacing is giving chaos and we don't do that here ๐ (PR#1055,c2e8831)
๐ Documentation
changelogโ clarified the wholeconvert_md_to_rstfilter situation that got added to the template environment ๐ (PR#1055,c2e8831)changelogโ more detail added about the configuration options for default changelog creation, so you actually know what you're doing ๐ซถ (PR#1055,c2e8831)configurationโ updatedchangelog_filewith a deprecation notice about setting relocation, so heads up bestie, peep that โ ๏ธ (PR#1055,c2e8831)configurationโ theoutput_formatdescription got updated to cover the whole reStructuredText support era ๐ (PR#1055,c2e8831)configurationโ details aboutinsertion_flag's dynamic defaults with rst are now documented, because dynamic defaults deserve lore ๐ (PR#1055,c2e8831)
๐ the receipts
PR#1055โhttps://github.com/python-semantic-release/python-semantic-release/pull/1055c2e8831โhttps://github.com/python-semantic-release/python-semantic-release/commit/c2e883104d3c11e56f229638e988d8b571f86e34#399โhttps://github.com/python-semantic-release/python-semantic-release/issues/399
v9.10.1 (2024-10-10)
๐ชฒ Bug Fixes
configโ branch match regex errors now get handled gracefully instead of just detonating ๐ the vibes are civilised now (PR#1054,4d12251)
๐ the receipts
PR#1054โhttps://github.com/python-semantic-release/python-semantic-release/pull/10544d12251โhttps://github.com/python-semantic-release/python-semantic-release/commit/4d12251c678a38de6b71cac5b9c1390eb9dd8ad6
v9.10.0 (2024-10-08)
โจ Features
changelogโchangelog_insertion_flaggot added to the changelog template context ๐ go forth and insert (PR#1045,c18c245)changelogโchangelog_modegot added to the changelog template context, main character of the context fr fr (PR#1045,c18c245)changelogโprev_changelog_filegot added to the changelog template context, so past-you can talk to present-you ๐ฆ (PR#1045,c18c245)changelogโ aread_filefunction got added to the changelog template context ๐ reading files inside templates, iconic behaviour (PR#1045,c18c245)changelogโ shorthandctxvariable got added to the changelog template env, because nobody has time to type the whole word โจ (PR#1045,c18c245)changelogโ the changelog template got modified so it can actually support changelog updates, and this one closes #858 ๐ (PR#1045,c18c245)configโ new config optionchangelog.default_templates.output_formathas entered the building ๐ฅ (PR#1045,c18c245)configโchangelog.insertion_flagis now a configuration option, yours to set ๐ (PR#1045,c18c245)configโchangelog.modeis now a configuration option too, obsessed ๐ฅฐ (PR#1045,c18c245)github-actionsโ added an action build directive to toggle the--skip-buildoption, so you can skip the build like it's a monday ๐ (PR#1044,26597e2)
๐ชฒ Bug Fixes
changelogโ angular heading names got adjusted for readability, because nobody was reading those ๐ (PR#1045,c18c245)changelogโ changelog templates can now handle complex directory includes without crumbling ๐ธ (PR#1045,c18c245)changelogโ user templates only render when the actual files exist, no ghost rendering here ๐ปโก๏ธ๐ซ (PR#1045,c18c245)configโ jinja will no longer autoescape markdown content by default, so your markdown stays markdown and not a pile of entities ๐ญ (PR#1045,c18c245)
๐ Documentation
changelog-templatesโ improved the detail and described the newchangelog.mode="update"situation, so it's giving "actually documented" ๐ (PR#1045,c18c245)commandsโ updated the definition of the version commands'--skip-buildoption, clarity is the vibe โจ (PR#1044,26597e2)configurationโ added thechangelog.modeandchangelog.insertion_flagconfig definitions ๐ (PR#1045,c18c245)configurationโ defined the newchangelog.default_templates.output_formatoption, brand new and already famous ๐ (PR#1045,c18c245)configurationโ marked the version of configuration setting introduction, timestamping the lore โณ (PR#1045,c18c245)configurationโ standardized everytrue/falseto lowercase to keep that toml-compatibility, slay ๐ (PR#1045,c18c245)configurationโ updated thechangelog.environment.autoescapedefault tofalseso the docs actually match the code, no more catfishing ๐ (PR#1045,c18c245)
๐ the receipts
PR#1045โhttps://github.com/python-semantic-release/python-semantic-release/pull/1045c18c245โhttps://github.com/python-semantic-release/python-semantic-release/commit/c18c245df51a9778af09b9dc7a315e3f11cdcda0PR#1044โhttps://github.com/python-semantic-release/python-semantic-release/pull/104426597e2โhttps://github.com/python-semantic-release/python-semantic-release/commit/26597e24a80a37500264aa95a908ba366699099e#858โhttps://github.com/python-semantic-release/python-semantic-release/issues/858github-actions: Add description of thebuildinput directive (PR#1044,26597e2)github-actions: Update primary example with workflowshacontrolled pipeline (14f04df)homepage: Update custom changelog reference (PR#1045,c18c245)
๐ v9.9.0 (2024-09-28)
โจ Features
github-actions: Addis_prereleaseoutput to theversionaction (PR#1038,6a5d35d)
๐ Documentation
automatic-releases: Drop extraneous github push configuration (PR#1011,2135c68)github-actions: Add configuration & description ofpublishaction (PR#1011,2135c68)github-actions: Add description of newis_prereleaseoutput forversionaction (PR#1038,6a5d35d)github-actions: Clarify & consolidate GitHub Actions usage docs, closes#907(PR#1011,2135c68)- ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/907 - ๐ PR:
https://github.com/python-semantic-release/python-semantic-release/pull/1011 - ๐ commit:
https://github.com/python-semantic-release/python-semantic-release/commit/2135c68ccbdad94378809902b52fcad546efd5b3
- ๐ issue:
github-actions: Expand descriptions & clarity of actions configs (PR#1011,2135c68)github-actions: Revert removal of namespace prefix from examples (PR#1011,2135c68)homepage: Remove link to old github config & update token scope config (PR#1011,2135c68)
๐ v9.8.9 (2024-09-27)
๐ชฒ Bug Fixes
version-cmd: Ensureversion_variablesdo not match partial variable names (PR#1028,156915c)version-cmd: Improveversion_variablesflexibility w/ quotes (ie.json,yaml, etc) (PR#1028,156915c)version-cmd: Increaseversion_variableflexibility with quotations (ie.json,yaml, etc), closes#601,#706,#962,#1026(PR#1028,156915c)- ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/601 - ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/706 - ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/962 - ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/1026 - ๐ PR:
https://github.com/python-semantic-release/python-semantic-release/pull/1028 - ๐ commit:
https://github.com/python-semantic-release/python-semantic-release/commit/156915c7d759098f65cf9de7c4e980b40b38d5f1
- ๐ issue:
๐ Documentation
- Update docstrings to resolve sphinx failures, closes
#1029(PR#1030,d84efc7)- ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/1029 - ๐ PR:
https://github.com/python-semantic-release/python-semantic-release/pull/1030 - ๐ commit:
https://github.com/python-semantic-release/python-semantic-release/commit/d84efc7719a8679e6979d513d1c8c60904af7384
- ๐ issue:
configuration: Add clarity toversion_variablesusage & limitations (PR#1028,156915c)homepage: Re-structure homepage to be separate from project readme (PR#1032,2307ed2)README: SimplifyREADMEto point at official docs (PR#1032,2307ed2)
๐ v9.8.8 (2024-09-01)
๐ชฒ Bug Fixes
config: Fix path traversal detection for windows compatibility, closes#994(PR#1014,16e6daa)- ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/994 - ๐ PR:
https://github.com/python-semantic-release/python-semantic-release/pull/1014 - ๐ commit:
https://github.com/python-semantic-release/python-semantic-release/commit/16e6daaf851ce1eabf5fbd5aa9fe310a8b0f22b3
- ๐ issue:
๐ Documentation
configuration: Updatebuild_commandenv table for windows to use all capital vars (0e8451c)github-actions: Update version in examples to latest version (3c894ea)
๐ v9.8.7 (2024-08-20)
๐ชฒ Bug Fixes
- Provide
context.historyglobal in release notes templates (PR#1005,5bd91b4) release-notes: Fixnoop-changelogto print raw release notes (PR#1005,5bd91b4)release-notes: Providecontext.historyglobal in release note templates, closes#984(PR#1005,5bd91b4)- ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/984 - ๐ PR:
https://github.com/python-semantic-release/python-semantic-release/pull/1005 - ๐ commit:
https://github.com/python-semantic-release/python-semantic-release/commit/5bd91b4d7ac33ddf10446f3e66d7d11e0724aeb2
- ๐ issue:
๐ Documentation
- Use pinned version for GHA examples (
PR#1004,5fdf761) changelog: Clarify description of the default changelog generation process (399fa65)configuration: Clarifychangelog_filevstemplate_diroption usage, closes#983(a7199c8)configuration: Fixbuild_command_envtable rendering (PR#996,a5eff0b)github-actions: Adjust formatting & version warning in code snippets (PR#1004,5fdf761)github-actions: Use pinned version for GHA examples, closes#1003(PR#1004,5fdf761)- ๐ issue:
https://github.com/python-semantic-release/python-semantic-release/issues/1003 - ๐ PR:
https://github.com/python-semantic-release/python-semantic-release/pull/1004 - ๐ commit:
https://github.com/python-semantic-release/python-semantic-release/commit/5fdf7614c036a77ffb051cd30f57d0a63c062c0d
- ๐ issue:
๐ v9.8.6 (2024-07-20)
๐ชฒ Bug Fixes
version-cmd: Resolve build command execution in powershell (PR#980,32c8e70)
๐ Documentation
configuration: Correct GHA parameter name for commit email (PR#981,ce9ffdb)
๐ v9.8.5 (2024-07-06)
๐ชฒ Bug Fixes
- Enable
--print-last-released*when in detached head or non-release branch (PR#926,782c0a6) changelogโ fixed the commit-ordering situation when dates are basically twins ๐๏ธโจ. Turns out similar dates were throwing the order off, and now they're not, periodt. (PR#972 <https://github.com/python-semantic-release/python-semantic-release/pull/972>, bfda159 <https://github.com/python-semantic-release/python-semantic-release/commit/bfda1593af59e9e728c584dd88d7927fc52c879f>)version-cmdโ the branch restriction on the--print-last-released*opts? Gone. Bye. ๐ closes #900 <https://github.com/python-semantic-release/python-semantic-release/issues/900> (PR#926 <https://github.com/python-semantic-release/python-semantic-release/pull/926>, 782c0a6 <https://github.com/python-semantic-release/python-semantic-release/commit/782c0a6109fb49e168c37f279928c0a4959f8ac6>)
โก Performance Improvements
- Improved the way git history gets processed for changelog generation โ lowkey zippier now ๐๏ธ๐จ (PR#972 <https://github.com/python-semantic-release/python-semantic-release/pull/972>, bfda159 <https://github.com/python-semantic-release/python-semantic-release/commit/bfda1593af59e9e728c584dd88d7927fc52c879f>)
changelogโ the git history parser got better at generating changelogs, no cap โจ (PR#972 <https://github.com/python-semantic-release/python-semantic-release/pull/972>, bfda159 <https://github.com/python-semantic-release/python-semantic-release/commit/bfda1593af59e9e728c584dd88d7927fc52c879f>)
v9.8.4 (2024-07-04)
๐ชฒ Bug Fixes
changelog-cmdโ stopped the usage strings from showing up when an error happens, closes #810 <https://github.com/python-semantic-release/python-semantic-release/issues/810> (348a51d <https://github.com/python-semantic-release/python-semantic-release/commit/348a51db8a837d951966aff3789aa0c93d473829>)changelog-cmdโ now it renders the default changelog when your user template directory exists but is empty (like, an empty folder isn't a personality bestie ๐ญ) (bded8de <https://github.com/python-semantic-release/python-semantic-release/commit/bded8deae6c92f6dde9774802d9f3716a5cb5705>)configโ closed off path traversal manipulation of the target changelog location ๐ (43e35d0 <https://github.com/python-semantic-release/python-semantic-release/commit/43e35d0972e8a29239d18ed079d1e2013342fcbd>)configโ and also closed off path traversal manipulation of the target changelog location (43e35dโฆ wait no, this one's the other commit) ๐ (3eb3dba <https://github.com/python-semantic-release/python-semantic-release/commit/3eb3dbafec4223ee463b90e927e551639c69426b>)publish-cmdโ no more erroring out when the tag you hand it doesn't exist locally ๐ท๏ธ (16afbbb <https://github.com/python-semantic-release/python-semantic-release/commit/16afbbb8fbc3a97243e96d7573f4ad2eba09aab9>)publish-cmdโ usage strings no longer appear when an error occurred, closes #810 <https://github.com/python-semantic-release/python-semantic-release/issues/810> (afbb187 <https://github.com/python-semantic-release/python-semantic-release/commit/afbb187d6d405fdf6765082e2a1cecdcd7d357df>)version-cmdโ same energy: usage strings removed from error output, closes #810 <https://github.com/python-semantic-release/python-semantic-release/issues/810> (a7c17c7 <https://github.com/python-semantic-release/python-semantic-release/commit/a7c17c73fd7becb6d0e042e45ff6765605187e2a>)
v9.8.3 (2024-06-18)
๐ชฒ Bug Fixes
parserโ strips those DOS carriage-returns out of commits now, the little gremlins ๐ closes #955 <https://github.com/python-semantic-release/python-semantic-release/issues/955> (PR#956 <https://github.com/python-semantic-release/python-semantic-release/pull/956>, 0b005df <https://github.com/python-semantic-release/python-semantic-release/commit/0b005df0a8c7730ee0c71453c9992d7b5d2400a4>)
v9.8.2 (2024-06-17)
๐ชฒ Bug Fixes
templatesโ suppressed the extra newlines sneaking into the default changelog, we do not want the blank space ๐ซ (PR#954 <https://github.com/python-semantic-release/python-semantic-release/pull/954>, 7b0079b <https://github.com/python-semantic-release/python-semantic-release/commit/7b0079bf3e17c0f476bff520b77a571aeac469d0>)
v9.8.1 (2024-06-05)
๐ชฒ Bug Fixes
- Improved the build cmd env on Windows ๐ช (PR#942 <https://github.com/python-semantic-release/python-semantic-release/pull/942>, d911fae <https://github.com/python-semantic-release/python-semantic-release/commit/d911fae993d41a8cb1497fa8b2a7e823576e0f22>)
version-cmdโ when you're on Windows, Windows-specific env vars now get passed to the build cmd (PR#942 <https://github.com/python-semantic-release/python-semantic-release/pull/942>, d911fae <https://github.com/python-semantic-release/python-semantic-release/commit/d911fae993d41a8cb1497fa8b2a7e823576e0f22>)
๐ Documentation
configurationโ wrote down the Windows-specific env vars for the build cmd (PR#942 <https://github.com/python-semantic-release/python-semantic-release/pull/942>, d911fae <https://github.com/python-semantic-release/python-semantic-release/commit/d911fae993d41a8cb1497fa8b2a7e823576e0f22>)
v9.8.0 (2024-05-27)
โจ Features
- Extended GitLab so it can edit a previous release if one exists ๐ (PR#934 <https://github.com/python-semantic-release/python-semantic-release/pull/934>, 23e02b9 <https://github.com/python-semantic-release/python-semantic-release/commit/23e02b96dfb2a58f6b4ecf7b7812e4c1bc50573d>)
ghaโ configured ssh signed tags in the GitHub Action, closes #936 <https://github.com/python-semantic-release/python-semantic-release/issues/936> (PR#937 <https://github.com/python-semantic-release/python-semantic-release/pull/937>, dfb76b9 <https://github.com/python-semantic-release/python-semantic-release/commit/dfb76b94b859a7f3fa3ad778eec7a86de2874d68>)hvcs-gitlabโ GitLab can now edit a previous release if it finds one (PR#934 <https://github.com/python-semantic-release/python-semantic-release/pull/934>, 23e02b9 <https://github.com/python-semantic-release/python-semantic-release/commit/23e02b96dfb2a58f6b4ecf7b7812e4c1bc50573d>)version-cmdโ added a toggle for the--no-verifyoption on git commit ๐๏ธ (PR#927 <https://github.com/python-semantic-release/python-semantic-release/pull/927>, 1de6f78 <https://github.com/python-semantic-release/python-semantic-release/commit/1de6f7834c6d37a74bc53f91609d40793556b52d>)
๐ชฒ Bug Fixes
gitlabโ adjusted the release name so it mirrors the other hvcs release names, consistency is the vibe ๐ (PR#934 <https://github.com/python-semantic-release/python-semantic-release/pull/934>, 23e02b9 <https://github.com/python-semantic-release/python-semantic-release/commit/23e02b96dfb2a58f6b4ecf7b7812e4c1bc50573d>)hvcs-gitlabโ added the tag message to release creation ๐ท๏ธ (PR#934 <https://github.com/python-semantic-release/python-semantic-release/pull/934>, 23e02b9 <https://github.com/python-semantic-release/python-semantic-release/commit/23e02b96dfb2a58f6b4ecf7b7812e4c1bc50573d>)
๐ Documentation
configurationโ added theno_git_verifydescription to the configuration page (PR#927 <https://github.com/python-semantic-release/python-semantic-release/pull/927>, 1de6f78 <https://github.com/python-semantic-release/python-semantic-release/commit/1de6f7834c6d37a74bc53f91609d40793556b52d>)migration-v8โ updated the version references in the migration instructions (PR#938 <https://github.com/python-semantic-release/python-semantic-release/pull/938>, d6ba16a <https://github.com/python-semantic-release/python-semantic-release/commit/d6ba16aa8e01bae1a022a9b06cd0b9162c51c345>)
v9.7.3 (2024-05-15)
๐ชฒ Bug Fixes
- Enabled the
prerelease-tokenparameter in the github action ๐ (PR#929 <https://github.com/python-semantic-release/python-semantic-release/pull/929>, 1bb26b0 <https://github.com/python-semantic-release/python-semantic-release/commit/1bb26b0762d94efd97c06a3f1b6b10fb76901f6d>)
v9.7.2 (2024-05-13)
๐ชฒ Bug Fixes
- Enabled user configuration of
build_commandenv vars ๐ ๏ธ (PR#925 <https://github.com/python-semantic-release/python-semantic-release/pull/925>, 6b5b271 <https://github.com/python-semantic-release/python-semantic-release/commit/6b5b271453874b982fbf2827ec1f6be6db1c2cc7>) versionโ enabled user config ofbuild_commandenv variables, closes #922 <https://github.com/python-semantic-release/python-semantic-release/issues/922> (PR#925 <https://github.com/python-semantic-release/python-semantic-release/pull/925>, 6b5b271 <https://github.com/python-semantic-release/python-semantic-release/commit/6b5b271453874b982fbf2827ec1f6be6db1c2cc7>)
๐ Documentation
configurationโ clarified the TOC & alphabetized the configuration descriptions, order is self-care ๐ (19add16 <https://github.com/python-semantic-release/python-semantic-release/commit/19add16dcfdfdb812efafe2d492a933d0856df1d>)configurationโ clarified the TOC & standardized the heading links (3a41995 <https://github.com/python-semantic-release/python-semantic-release/commit/3a4199542d0ea4dbf88fa35e11bec41d0c27dd17>)configurationโ documented thebuild_command_envconfiguration option (PR#925 <https://github.com/python-semantic-release/python-semantic-release/pull/925>, 6b5b271 <https://github.com/python-semantic-release/python-semantic-release/commit/6b5b271453874b982fbf2827ec1f6be6db1c2cc7>)CONTRIBUTINGโ updated the build command definition for developers (PR#921 <https://github.com/python-semantic-release/python-semantic-release/pull/921>, b573c4d <https://github.com/python-semantic-release/python-semantic-release/commit/b573c4d4a2c212be9bdee918501bb5e046c6a806>)
v9.7.1 (2024-05-07)
๐ชฒ Bug Fixes
ghaโ fixed the missinggit_committer_*definition in the action, closes #918 <https://github.com/python-semantic-release/python-semantic-release/issues/918> (PR#919 <https://github.com/python-semantic-release/python-semantic-release/pull/919>, ccef9d8 <https://github.com/python-semantic-release/python-semantic-release/commit/ccef9d8521be12c0640369b3c3a80b81a7832662>)
v9.7.0 (2024-05-06)
โจ Features
version-cmdโ passesNEW_VERSION& useful env vars to the build command ๐ (ee6b246 <https://github.com/python-semantic-release/python-semantic-release/commit/ee6b246df3bb211ab49c8bce075a4c3f6a68ed77>)
๐ชฒ Bug Fixes
ghaโ added the missingtagoption to the GitHub Action definition, closes #906 <https://github.com/python-semantic-release/python-semantic-release/issues/906> (PR#908 <https://github.com/python-semantic-release/python-semantic-release/pull/908>, 6b24288 <https://github.com/python-semantic-release/python-semantic-release/commit/6b24288a96302cd6982260e46fad128ec4940da9>)ghaโ corrected the use of theprereleaseoption for the GitHub Action (PR#914 <https://github.com/python-semantic-release/python-semantic-release/pull/914>, 85e27b7 <https://github.com/python-semantic-release/python-semantic-release/commit/85e27b7f486e6b0e6cc9e85e101a97e676bc3d60>)
๐ Documentation โจ
configurationโ we added a description of the env variables the build command has available to it ๐ ๏ธ (commitc882dc6<https://github.com/python-semantic-release/python-semantic-release/commit/c882dc62b860b2aeaa925c21d1524f4ae25ef567>)ghaโ the GitHub Actions docs got updated with all the available options, no gatekeeping bestie โจ (PR#914 <https://github.com/python-semantic-release/python-semantic-release/pull/914>,85e27b7<https://github.com/python-semantic-release/python-semantic-release/commit/85e27b7f486e6b0e6cc9e85e101a97e676bc3d60>)
โ๏ธ Build System ๐ง
depsโ bumped the GitHub Action container so it usespython3.12, closes #801 <https://github.com/python-semantic-release/python-semantic-release/issues/801> (PR#914 <https://github.com/python-semantic-release/python-semantic-release/pull/914>,85e27b7<https://github.com/python-semantic-release/python-semantic-release/commit/85e27b7f486e6b0e6cc9e85e101a97e676bc3d60>)
v9.6.0 (2024-04-29) ๐
โจ Features
- Changelog filters are specialized per vcs type ๐
(PR#890 <https://github.com/python-semantic-release/python-semantic-release/pull/890>,
76ed593<https://github.com/python-semantic-release/python-semantic-release/commit/76ed593ea33c851005994f0d1a6a33cc890fb908>) changelogโ changelog filters are hvcs focused now ๐ฆ (PR#890 <https://github.com/python-semantic-release/python-semantic-release/pull/890>,76ed593<https://github.com/python-semantic-release/python-semantic-release/commit/76ed593ea33c851005994f0d1a6a33cc890fb908>)changelog-contextโ added a flag to the jinja env that says which hvcs is available ๐ (PR#890 <https://github.com/python-semantic-release/python-semantic-release/pull/890>,76ed593<https://github.com/python-semantic-release/python-semantic-release/commit/76ed593ea33c851005994f0d1a6a33cc890fb908>)changelog-giteaโ added an issue url filter to the changelog context ๐ธ (PR#890 <https://github.com/python-semantic-release/python-semantic-release/pull/890>,76ed593<https://github.com/python-semantic-release/python-semantic-release/commit/76ed593ea33c851005994f0d1a6a33cc890fb908>)changelog-githubโ added an issue url filter to the changelog context ๐ (PR#890 <https://github.com/python-semantic-release/python-semantic-release/pull/890>,76ed593<https://github.com/python-semantic-release/python-semantic-release/commit/76ed593ea33c851005994f0d1a6a33cc890fb908>)version-cmdโ added the--as-prereleaseoption to force the next version to be a prerelease, closes #639 <https://github.com/python-semantic-release/python-semantic-release/issues/639> (PR#647 <https://github.com/python-semantic-release/python-semantic-release/pull/647>,2acb5ac<https://github.com/python-semantic-release/python-semantic-release/commit/2acb5ac35ae79d7ae25ca9a03fb5c6a4a68b3673>)
๐ชฒ Bug Fixes
- Corrected version
--prereleaseusage & enabled--as-prerelease๐ (PR#647 <https://github.com/python-semantic-release/python-semantic-release/pull/647>,2acb5ac<https://github.com/python-semantic-release/python-semantic-release/commit/2acb5ac35ae79d7ae25ca9a03fb5c6a4a68b3673>) githubโ corrected the changelog filter for pull request urls ๐ (PR#890 <https://github.com/python-semantic-release/python-semantic-release/pull/890>,76ed593<https://github.com/python-semantic-release/python-semantic-release/commit/76ed593ea33c851005994f0d1a6a33cc890fb908>)parser-customโ custom parser import errors are handled gracefully now, no more screaming ๐ซถ (67f6038<https://github.com/python-semantic-release/python-semantic-release/commit/67f60389e3f6e93443ea108c0e1b4d30126b8e06>)version-cmdโ corrected--prereleaseusage, closes #639 <https://github.com/python-semantic-release/python-semantic-release/issues/639> (PR#647 <https://github.com/python-semantic-release/python-semantic-release/pull/647>,2acb5ac<https://github.com/python-semantic-release/python-semantic-release/commit/2acb5ac35ae79d7ae25ca9a03fb5c6a4a68b3673>)
๐ Documentation โจ
changelog-contextโ explained the new hvcs specific context filters ๐ง (PR#890 <https://github.com/python-semantic-release/python-semantic-release/pull/890>,76ed593<https://github.com/python-semantic-release/python-semantic-release/commit/76ed593ea33c851005994f0d1a6a33cc890fb908>)commandsโ updated the version command options definition so it talks about prereleases properly ๐ (PR#647 <https://github.com/python-semantic-release/python-semantic-release/pull/647>,2acb5ac<https://github.com/python-semantic-release/python-semantic-release/commit/2acb5ac35ae79d7ae25ca9a03fb5c6a4a68b3673>)
v9.5.0 (2024-04-23) ๐ฆ
โจ Features
- Extended support to on-prem GitHub Enterprise Server ๐ข (PR#896 <https://github.com/python-semantic-release/python-semantic-release/pull/896>,
4fcb737<https://github.com/python-semantic-release/python-semantic-release/commit/4fcb737958d95d1a3be24db7427e137b46f5075f>) githubโ extended support to on-prem GitHub Enterprise Server, closes #895 <https://github.com/python-semantic-release/python-semantic-release/issues/895> (PR#896 <https://github.com/python-semantic-release/python-semantic-release/pull/896>,4fcb737<https://github.com/python-semantic-release/python-semantic-release/commit/4fcb737958d95d1a3be24db7427e137b46f5075f>)
v9.4.2 (2024-04-14) ๐
๐ชฒ Bug Fixes
bitbucketโ insecure http connections are allowed now if you configured them that way ๐ (PR#886 <https://github.com/python-semantic-release/python-semantic-release/pull/886>,db13438<https://github.com/python-semantic-release/python-semantic-release/commit/db1343890f7e0644bc8457f995f2bd62087513d3>)bitbucketโ corrected url parsing & stopped double url schemes from happening ๐ญ (PR#676 <https://github.com/python-semantic-release/python-semantic-release/pull/676>,5cfdb24<https://github.com/python-semantic-release/python-semantic-release/commit/5cfdb248c003a2d2be5fe65fb61d41b0d4c45db5>)configโ added the flag that lets you allow insecure connections ๐ง (PR#886 <https://github.com/python-semantic-release/python-semantic-release/pull/886>,db13438<https://github.com/python-semantic-release/python-semantic-release/commit/db1343890f7e0644bc8457f995f2bd62087513d3>)giteaโ insecure http connections are allowed now if configured ๐ฟ (PR#886 <https://github.com/python-semantic-release/python-semantic-release/pull/886>,db13438<https://github.com/python-semantic-release/python-semantic-release/commit/db1343890f7e0644bc8457f995f2bd62087513d3>)giteaโ corrected url parsing & prevented double url schemes ๐ต (PR#676 <https://github.com/python-semantic-release/python-semantic-release/pull/676>,5cfdb24<https://github.com/python-semantic-release/python-semantic-release/commit/5cfdb248c003a2d2be5fe65fb61d41b0d4c45db5>)githubโ insecure http connections are allowed now if configured ๐ (PR#886 <https://github.com/python-semantic-release/python-semantic-release/pull/886>,db13438<https://github.com/python-semantic-release/python-semantic-release/commit/db1343890f7e0644bc8457f995f2bd62087513d3>)githubโ corrected url parsing & prevented double url schemes ๐ (PR#676 <https://github.com/python-semantic-release/python-semantic-release/pull/676>,5cfdb24<https://github.com/python-semantic-release/python-semantic-release/commit/5cfdb248c003a2d2be5fe65fb61d41b0d4c45db5>)gitlabโ insecure http connections are allowed now if configured ๐ฆ (PR#886 <https://github.com/python-semantic-release/python-semantic-release/pull/886>,db13438<https://github.com/python-semantic-release/python-semantic-release/commit/db1343890f7e0644bc8457f995f2bd62087513d3>)gitlabโ corrected url parsing & prevented double url schemes โจ (PR#676 <https://github.com/python-semantic-release/python-semantic-release/pull/676>,5cfdb24<https://github.com/python-semantic-release/python-semantic-release/commit/5cfdb248c003a2d2be5fe65fb61d41b0d4c45db5>)hvcsโ insecure http connections are allowed now if configured ๐ซถ (PR#886 <https://github.com/python-semantic-release/python-semantic-release/pull/886>,db13438<https://github.com/python-semantic-release/python-semantic-release/commit/db1343890f7e0644bc8457f995f2bd62087513d3>)hvcsโ prevented double protocol scheme urls from sneaking into changelogs ๐ซ (PR#676 <https://github.com/python-semantic-release/python-semantic-release/pull/676>,5cfdb24<https://github.com/python-semantic-release/python-semantic-release/commit/5cfdb248c003a2d2be5fe65fb61d41b0d4c45db5>)version-cmdโ HTTP exceptions get handled more gracefully now, she's calm ๐ง (PR#886 <https://github.com/python-semantic-release/python-semantic-release/pull/886>,db13438<https://github.com/python-semantic-release/python-semantic-release/commit/db1343890f7e0644bc8457f995f2bd62087513d3>)
๐ Documentation โจ
configurationโ updated the remote settings section with the missing values, closes #868 <https://github.com/python-semantic-release/python-semantic-release/issues/868> (PR#886 <https://github.com/python-semantic-release/python-semantic-release/pull/886>,db13438<https://github.com/python-semantic-release/python-semantic-release/commit/db1343890f7e0644bc8457f995f2bd62087513d3>)
โ๏ธ Build System ๐ง
depsโ updated therichrequirement from~=12.5to~=13.0, closes #888 <https://github.com/python-semantic-release/python-semantic-release/issues/888> (PR#877 <https://github.com/python-semantic-release/python-semantic-release/pull/877>,4a22a8c<https://github.com/python-semantic-release/python-semantic-release/commit/4a22a8c1a69bcf7b1ddd6db56e6883c617a892b3>)
v9.4.1 (2024-04-06) ๐
๐ชฒ Bug Fixes
gh-actions-outputโ fixed the trailing newline so it matches theGITHUB_OUTPUTformat ๐ (PR#885 <https://github.com/python-semantic-release/python-semantic-release/pull/885>,2c7b6ec<https://github.com/python-semantic-release/python-semantic-release/commit/2c7b6ec85b6e3182463d7b695ee48e9669a25b3b>)gh-actions-outputโ fixed the trailing newline so it matches theGITHUB_OUTPUTformat, closes #884 <https://github.com/python-semantic-release/python-semantic-release/issues/884> (PR#885 <https://github.com/python-semantic-release/python-semantic-release/pull/885>,2c7b6ec<https://github.com/python-semantic-release/python-semantic-release/commit/2c7b6ec85b6e3182463d7b695ee48e9669a25b3b>)
v9.4.0 (2024-03-31) ๐
โจ Features
giteaโ derives the gitea api domain from the base domain when it's unspecified, lowkey genius ๐ต (PR#675 <https://github.com/python-semantic-release/python-semantic-release/pull/675>,2ee3f8a<https://github.com/python-semantic-release/python-semantic-release/commit/2ee3f8a918d2e5ea9ab64df88f52e62a1f589c38>)
v9.3.1 (2024-03-24) โจ
๐ชฒ Bug Fixes
algorithmโ bestie, it now handles merge-base errors gracefully instead of just. dying. closes#724<https://github.com/python-semantic-release/python-semantic-release/issues/724> (4c998b7<https://github.com/python-semantic-release/python-semantic-release/commit/4c998b77a3fe5e12783d1ab2d47789a10b83f247>) ๐cli-versionโ the implementation got switched up so it only pushes the tag we generated, no cap. closes#803<https://github.com/python-semantic-release/python-semantic-release/issues/803> (8a9da4f<https://github.com/python-semantic-release/python-semantic-release/commit/8a9da4feb8753e3ab9ea752afa25decd2047675a>)
โก Performance Improvements
algorithmโ simplified the logs & used lookup when searching for commit & tag match, so it's giving speed now (3690b95<https://github.com/python-semantic-release/python-semantic-release/commit/3690b9511de633ab38083de4d2505b6d05853346>)
v9.3.0 (2024-03-21) โจ
โจ Features
cmd-versionโ changelog available to bundle now, iconic behavior (PR#779<https://github.com/python-semantic-release/python-semantic-release/pull/779>,37fdb28<https://github.com/python-semantic-release/python-semantic-release/commit/37fdb28e0eb886d682b5dea4cc83a7c98a099422>)cmd-versionโ creates the changelog prior to build, which enables doc bundling. obsessed. (PR#779<https://github.com/python-semantic-release/python-semantic-release/pull/779>,37fdb28<https://github.com/python-semantic-release/python-semantic-release/commit/37fdb28e0eb886d682b5dea4cc83a7c98a099422>)
v9.2.2 (2024-03-19) โจ
๐ชฒ Bug Fixes
cliโ subcommand help works even if your config is invalid now ๐ซถ. closes#840<https://github.com/python-semantic-release/python-semantic-release/issues/840> (91d221a<https://github.com/python-semantic-release/python-semantic-release/commit/91d221a01266e5ca6de5c73296b0a90987847494>)
v9.2.1 (2024-03-19) โจ
๐ชฒ Bug Fixes
parse-git-urlโ handles urls with url-safe special characters, finally ๐ (27cd93a<https://github.com/python-semantic-release/python-semantic-release/commit/27cd93a0a65ee3787ca51be4c91c48f6ddb4269c>)
v9.2.0 (2024-03-18) โจ
โจ Features
versionโ added new version print flags to display the last released version and tag. main character energy fr (814240c<https://github.com/python-semantic-release/python-semantic-release/commit/814240c7355df95e9be9a6ed31d004b800584bc0>)version-configโ new option to disable 0.x.x versions, iykyk (dedb3b7<https://github.com/python-semantic-release/python-semantic-release/commit/dedb3b765c8530379af61d3046c3bb9c160d54e5>)
๐ชฒ Bug Fixes
changelogโ makes sure the default templates render ending in 1 newline, no extra strays ๐ (0b4a45e<https://github.com/python-semantic-release/python-semantic-release/commit/0b4a45e3673d0408016dc8e7b0dce98007a763e3>)changelog-generationโ fixed incorrect release timezone determination, the clocks were clocking wrong ๐ญ (f802446<https://github.com/python-semantic-release/python-semantic-release/commit/f802446bd0693c4c9f6bdfdceae8b89c447827d2>)
๐ Documentation
configurationโ added a description of theallow-zero-versionconfiguration option (4028f83<https://github.com/python-semantic-release/python-semantic-release/commit/4028f8384a0181c8d58c81ae81cf0b241a02a710>)configurationโ clarified themajor_on_zeroconfiguration option (f7753cd<https://github.com/python-semantic-release/python-semantic-release/commit/f7753cdabd07e276bc001478d605fca9a4b37ec4>)
โ๏ธ Build System
depsโ addedclick-option-groupfor grouping exclusive flags (bd892b8<https://github.com/python-semantic-release/python-semantic-release/commit/bd892b89c26df9fccc9335c84e2b3217e3e02a37>)
v9.1.1 (2024-02-25) โจ
๐ชฒ Bug Fixes
parse_git_urlโ fixed a bad url with a dash in it (1c25b8e<https://github.com/python-semantic-release/python-semantic-release/commit/1c25b8e6f1e43c15ca7d5a59dca0a13767f9bc33>)
v9.1.0 (2024-02-14) โจ
โจ Features
- added bitbucket hvcs ๐ (
bbbbfeb<https://github.com/python-semantic-release/python-semantic-release/commit/bbbbfebff33dd24b8aed2d894de958d532eac596>)
๐ชฒ Bug Fixes
- removed unofficial environment variables (bye bye bestie) (
a5168e4<https://github.com/python-semantic-release/python-semantic-release/commit/a5168e40b9a14dbd022f62964f382b39faf1e0df>)
๐ Documentation
- added bitbucket authentication (
b78a387<https://github.com/python-semantic-release/python-semantic-release/commit/b78a387d8eccbc1a6a424a183254fc576126199c>) - added bitbucket to token table (
56f146d<https://github.com/python-semantic-release/python-semantic-release/commit/56f146d9f4c0fc7f2a84ad11b21c8c45e9221782>) - fixed a typo, we love a glow-up (
b240e12<https://github.com/python-semantic-release/python-semantic-release/commit/b240e129b180d45c1d63d464283b7dfbcb641d0c>)
โ๏ธ Build System
depsโ bumped the minimum requiredtomlkitto>=0.11.0. closes#834<https://github.com/python-semantic-release/python-semantic-release/issues/834> (291aace<https://github.com/python-semantic-release/python-semantic-release/commit/291aacea1d0429a3b27e92b0a20b598f43f6ea6b>)
v9.0.3 (2024-02-08) โจ
๐ชฒ Bug Fixes
algorithmโ correctedbfsso it doesn't abort on a previously visited node, lowkey a huge deal (02df305<https://github.com/python-semantic-release/python-semantic-release/commit/02df305db43abfc3a1f160a4a52cc2afae5d854f>)
โก Performance Improvements
algorithmโ refactored thebfssearch to use a queue rather than recursion, ate and left no crumbs (8b742d3<https://github.com/python-semantic-release/python-semantic-release/commit/8b742d3db6652981a7b5f773a74b0534edc1fc15>)
v9.0.2 (2024-02-08) โจ
๐ชฒ Bug Fixes
utilโ properly parses windows line-endings in commit messages now, closes#820<https://github.com/python-semantic-release/python-semantic-release/issues/820> (70193ba<https://github.com/python-semantic-release/python-semantic-release/commit/70193ba117c1a6d3690aed685fee8a734ba174e5>)
๐ Documentation
- removed the duplicate note in
configuration.rst(PR#807<https://github.com/python-semantic-release/python-semantic-release/pull/807>,fb6f243<https://github.com/python-semantic-release/python-semantic-release/commit/fb6f243a141642c02469f1080180ecaf4f3cec66>)
v9.0.1 (2024-02-06) โจ
๐ชฒ Bug Fixes
configโ sets the commit parser opt defaults based on your parser choice, very considerate of it (PR#782<https://github.com/python-semantic-release/python-semantic-release/pull/782>,9c594fb<https://github.com/python-semantic-release/python-semantic-release/commit/9c594fb6efac7e4df2b0bfbd749777d3126d03d7>)
v9.0.0 (2024-02-06) โจ
โป๏ธ Refactoring
- dropped support for Python 3.7 (
PR#828<https://github.com/python-semantic-release/python-semantic-release/pull/828>,ad086f5<https://github.com/python-semantic-release/python-semantic-release/commit/ad086f5993ae4741d6e20fee618d1bce8df394fb>)
๐ฅ BREAKING CHANGES
okay bestie listen up, this one is serious.
- Removed Python 3.7 specific control flows and made more modern implementations the default control flow without a bypass or workaround. Will break on Python 3.7 now. If you require Python 3.7, you should lock your major version at
v8. Since we only have enough manpower to maintain the latest major release, unfortunately there will not be any more updates tov8. - We decided to remove support for Python 3.7 because it has been officially deprecated by the Python Foundation over a year ago and our codebase is starting to have limitations and custom implementations just to maintain support for 3.7.
v8.7.2 (2024-01-03) โจ
๐ชฒ Bug Fixes
lintโ corrected linter errors, tidy โจ (c9556b0<https://github.com/python-semantic-release/python-semantic-release/commit/c9556b0ca6df6a61e9ce909d18bc5be8b6154bf8>)
v8.7.1 (2024-01-03) โจ
๐ชฒ Bug Fixes
cli-generate-configโ makes sure configuration types are always toml parsable no matter what (PR#785<https://github.com/python-semantic-release/python-semantic-release/pull/785>,758e649<https://github.com/python-semantic-release/python-semantic-release/commit/758e64975fe46b961809f35977574729b7c44271>)
๐ Documentation
- added a note on default envvar behavior (
PR#780<https://github.com/python-semantic-release/python-semantic-release/pull/780>,0b07cae<https://github.com/python-semantic-release/python-semantic-release/commit/0b07cae71915c5c82d7784898b44359249542a64>) configurationโ changed the defaults definition oftokendefault to a table (PR#786<https://github.com/python-semantic-release/python-semantic-release/pull/786>,df1df0d<https://github.com/python-semantic-release/python-semantic-release/commit/df1df0de8bc655cbf8f86ae52aff10efdc66e6d2>)contributingโ added docs-build, testing conf, & build instructions (PR#787<https://github.com/python-semantic-release/python-semantic-release/pull/787>,011b072<https://github.com/python-semantic-release/python-semantic-release/commit/011b0729cba3045b4e7291fd970cb17aad7bae60>)
v8.7.0 (2023-12-22) โจ
โจ Features
configโ enables default environment token per hvcs, slay (PR#774<https://github.com/python-semantic-release/python-semantic-release/pull/774>,26528eb<https://github.com/python-semantic-release/python-semantic-release/commit/26528eb8794d00dfe985812269702fbc4c4ec788>)
v8.6.0 (2023-12-22) โจ
โจ Features
utilsโ expanded the parsable valid git remote url formats, so many more shapes it can handle now ๐ (PR#771<https://github.com/python-semantic-release/python-semantic-release/pull/771>,cf75f23<https://github.com/python-semantic-release/python-semantic-release/commit/cf75f237360488ebb0088e5b8aae626e97d9cbdd>)
๐ Documentation
- minor correction to the commit-parsing documentation (
PR#777<https://github.com/python-semantic-release/python-semantic-release/pull/777>,245e878<https://github.com/python-semantic-release/python-semantic-release/commit/245e878f02d5cafec6baf0493c921c1e396b56e8>)
v8.5.2 (2023-12-19) โจ
๐ชฒ Bug Fixes
cliโ now gracefully outputs configuration validation errors instead of justโฆ screaming into the void (PR#772<https://github.com/python-semantic-release/python-semantic-release/pull/772>,e8c9d51<https://github.com/python-semantic-release/python-semantic-release/commit/e8c9d516c37466a5dce75a73766d5be0f9e74627>)
v8.5.1 (2023-12-12) โจ
๐ชฒ Bug Fixes
cmd-versionโ handles committing of a git-ignored file gracefully now ๐ซถ (PR#764<https://github.com/python-semantic-release/python-semantic-release/pull/764>,ea89fa7<https://github.com/python-semantic-release/python-semantic-release/commit/ea89fa72885e15da91687172355426a22c152513>)configโ cleanly handles a repository in detached HEAD state, no more chaos energy (PR#765<https://github.com/python-semantic-release/python-semantic-release/pull/765>,ac4f9aa<https://github.com/python-semantic-release/python-semantic-release/commit/ac4f9aacb72c99f2479ae33369822faad011a824>)- config: bestie, if your repo ends up in a detached HEAD state, it now fails gracefully instead of going full chaos mode (
PR#765โhttps://github.com/python-semantic-release/python-semantic-release/pull/765,ac4f9aaโhttps://github.com/python-semantic-release/python-semantic-release/commit/ac4f9aacb72c99f2479ae33369822faad011a824) ๐ซถ - version: during the version commit, only files that arenโt git-ignored get committed, no cap (
PR#764โhttps://github.com/python-semantic-release/python-semantic-release/pull/764,ea89fa7โhttps://github.com/python-semantic-release/python-semantic-release/commit/ea89fa72885e15da91687172355426a22c152513) โจ
๐ Documentation
- configuration: wording got adjusted and clarity got improved, as it should (
PR#766โhttps://github.com/python-semantic-release/python-semantic-release/pull/766,6b2fc8cโhttps://github.com/python-semantic-release/python-semantic-release/commit/6b2fc8c156e122ee1b43fdb513b2dc3b8fd76724) ๐ - configuration: a typo in the text got fixed, we love to see it (
PR#766โhttps://github.com/python-semantic-release/python-semantic-release/pull/766,6b2fc8cโhttps://github.com/python-semantic-release/python-semantic-release/commit/6b2fc8c156e122ee1b43fdb513b2dc3b8fd76724) ๐ญ
v8.5.0 (2023-12-07) โจ
โจ Features
- Template directories can now contain a
'.'at the top-level, slay (PR#762โhttps://github.com/python-semantic-release/python-semantic-release/pull/762,07b232aโhttps://github.com/python-semantic-release/python-semantic-release/commit/07b232a3b34be0b28c6af08aea4852acb1b9bd56) ๐ฆ
v8.4.0 (2023-12-07)
โจ Features
- cmd-version: the
versioncommand got a--tag/--no-tagoption, iconic (PR#752โhttps://github.com/python-semantic-release/python-semantic-release/pull/752,de6b9adโhttps://github.com/python-semantic-release/python-semantic-release/commit/de6b9ad921e697b5ea2bb2ea8f180893cecca920) ๐ - version: new
--no-tagoption turns tag creation all the way off, periodt (PR#752โhttps://github.com/python-semantic-release/python-semantic-release/pull/752,de6b9adโhttps://github.com/python-semantic-release/python-semantic-release/commit/de6b9ad921e697b5ea2bb2ea8f180893cecca920) ๐
๐ชฒ Bug Fixes
- version: when changes arenโt being committed, push tags are separated from the commit push, lowkey important (
PR#752โhttps://github.com/python-semantic-release/python-semantic-release/pull/752,de6b9adโhttps://github.com/python-semantic-release/python-semantic-release/commit/de6b9ad921e697b5ea2bb2ea8f180893cecca920) ๐ฅ
๐ Documentation
- commands: the version subcommand options got updated, as they should (
PR#752โhttps://github.com/python-semantic-release/python-semantic-release/pull/752,de6b9adโhttps://github.com/python-semantic-release/python-semantic-release/commit/de6b9ad921e697b5ea2bb2ea8f180893cecca920) ๐ธ - migration: comments about the
publishcommand got fixed, finally (PR#747โhttps://github.com/python-semantic-release/python-semantic-release/pull/747,90380d7โhttps://github.com/python-semantic-release/python-semantic-release/commit/90380d797a734dcca5040afc5fa00e3e01f64152) ๐ซถ
v8.3.0 (2023-10-23)
โจ Features
- action: semantic release now uses a composite action, main character energy (
PR#692โhttps://github.com/python-semantic-release/python-semantic-release/pull/692,4648d87โhttps://github.com/python-semantic-release/python-semantic-release/commit/4648d87bac8fb7e6cc361b765b4391b30a8caef8) โจ
v8.2.0 (2023-10-23)
โจ Features
- You can now customize the release notes template, obsessed (
PR#736โhttps://github.com/python-semantic-release/python-semantic-release/pull/736,94a1311โhttps://github.com/python-semantic-release/python-semantic-release/commit/94a131167e1b867f8bc112a042b9766e050ccfd1) ๐
๐ Documentation
- Added a
PYTHONPATHmention for the commit parser, iykyk (3284258โhttps://github.com/python-semantic-release/python-semantic-release/commit/3284258b9fa1a3fe165f336181aff831d50fddd3) ๐
v8.1.2 (2023-10-13)
๐ชฒ Bug Fixes
- Lint errors got corrected, no more mess (
a13a6c3โhttps://github.com/python-semantic-release/python-semantic-release/commit/a13a6c37e180dc422599939a5725835306c18ff2) ๐ - Running the build command on windows systems no longer errors out, thank god (
PR#732โhttps://github.com/python-semantic-release/python-semantic-release/pull/732,2553657โhttps://github.com/python-semantic-release/python-semantic-release/commit/25536574760b407410f435441da533fafbf94402) ๐
v8.1.1 (2023-09-19)
๐ชฒ Bug Fixes
- Logging non-strings no longer throws an attribute error, we stan (
PR#711โhttps://github.com/python-semantic-release/python-semantic-release/pull/711,75e6e48โhttps://github.com/python-semantic-release/python-semantic-release/commit/75e6e48129da8238a62d5eccac1ae55d0fee0f9f) ๐ญ
v8.1.0 (2023-09-19)
โจ Features
- pydantic got upgraded to v2, it's giving modern (
PR#714โhttps://github.com/python-semantic-release/python-semantic-release/pull/714,5a5c5d0โhttps://github.com/python-semantic-release/python-semantic-release/commit/5a5c5d0ee347750d7c417c3242d52e8ada50b217) โญ
๐ Documentation
- Typos got fixed, periodt (
PR#708โhttps://github.com/python-semantic-release/python-semantic-release/pull/708,2698b0eโhttps://github.com/python-semantic-release/python-semantic-release/commit/2698b0e006ff7e175430b98450ba248ed523b341) ๐ - Project urls got updated, slay (
PR#715โhttps://github.com/python-semantic-release/python-semantic-release/pull/715,5fd5485โhttps://github.com/python-semantic-release/python-semantic-release/commit/5fd54856dfb6774feffc40d36d5bb0f421f04842) ๐ซถ
v8.0.8 (2023-08-26)
๐ชฒ Bug Fixes
Dynamic_import()import path split got handled, iconic (PR#686โhttps://github.com/python-semantic-release/python-semantic-release/pull/686,1007a06โhttps://github.com/python-semantic-release/python-semantic-release/commit/1007a06d1e16beef6d18f44ff2e0e09921854b54) ๐ฆ
v8.0.7 (2023-08-16)
๐ชฒ Bug Fixes
- Now uses the correct upload url for github, finally (
PR#661โhttps://github.com/python-semantic-release/python-semantic-release/pull/661,8a515caโhttps://github.com/python-semantic-release/python-semantic-release/commit/8a515caf1f993aa653e024beda2fdb9e629cc42a) ๐ฅ
v8.0.6 (2023-08-13)
๐ชฒ Bug Fixes
- publish: the error message when no tags are found got improved, helpful (
PR#683โhttps://github.com/python-semantic-release/python-semantic-release/pull/683,bdc06eaโhttps://github.com/python-semantic-release/python-semantic-release/commit/bdc06ea061c19134d5d74bd9f168700dd5d9bcf5) ๐ธ
v8.0.5 (2023-08-10)
๐ชฒ Bug Fixes
- No more warning about vcs token if
ignore_token_for_pushis true, peace (PR#670โhttps://github.com/python-semantic-release/python-semantic-release/pull/670,f1a54a6โhttps://github.com/python-semantic-release/python-semantic-release/commit/f1a54a6c9a05b225b6474d50cd610eca19ec0c34) ๐
๐ Documentation
- password should be token, say it louder (
PR#670โhttps://github.com/python-semantic-release/python-semantic-release/pull/670,f1a54a6โhttps://github.com/python-semantic-release/python-semantic-release/commit/f1a54a6c9a05b225b6474d50cd610eca19ec0c34) ๐ - Fixed typo missing
's'inversion_variable[s]inconfiguration.rst, we love a typo fix (PR#668โhttps://github.com/python-semantic-release/python-semantic-release/pull/668,879186aโhttps://github.com/python-semantic-release/python-semantic-release/commit/879186aa09a3bea8bbe2b472f892cf7c0712e557) ๐ญ
v8.0.4 (2023-07-26)
๐ชฒ Bug Fixes
- changelog: uses version as semver tag by default, as it should (
PR#653โhttps://github.com/python-semantic-release/python-semantic-release/pull/653,5984c77โhttps://github.com/python-semantic-release/python-semantic-release/commit/5984c7771edc37f0d7d57894adecc2591efc414d) โญ
๐ Documentation
- Added Python 3.11 to classifiers in metadata, slay (
PR#651โhttps://github.com/python-semantic-release/python-semantic-release/pull/651,5a32a24โhttps://github.com/python-semantic-release/python-semantic-release/commit/5a32a24bf4128c39903f0c5d3bd0cb1ccba57e18) ๐ - Clarified usage of assets config option, finally (
PR#655โhttps://github.com/python-semantic-release/python-semantic-release/pull/655,efa2b30โhttps://github.com/python-semantic-release/python-semantic-release/commit/efa2b3019b41eb427f0e1c8faa21ad10664295d0) โจ
v8.0.3 (2023-07-21)
๐ชฒ Bug Fixes
- Non-parsable versions are now skipped when calculating the next version, no more drama (
PR#649โhttps://github.com/python-semantic-release/python-semantic-release/pull/649,88f25eaโhttps://github.com/python-semantic-release/python-semantic-release/commit/88f25eae62589cdf53dbc3dfcb167a3ae6cba2d3) ๐
v8.0.2 (2023-07-18)
๐ชฒ Bug Fixes
- Missing configuration is now handled, thank god (
PR#644โhttps://github.com/python-semantic-release/python-semantic-release/pull/644,f15753cโhttps://github.com/python-semantic-release/python-semantic-release/commit/f15753ce652f36cc03b108c667a26ab74bcbf95d) ๐ซถ
๐ Documentation
- Better description for
tag_formatusage, clarity queen (2129b72โhttps://github.com/python-semantic-release/python-semantic-release/commit/2129b729837eccc41a33dbb49785a8a30ce6b187) ๐ท๏ธ - v8 breaking changes in GitHub action inputs got clarified, needed (
PR#643โhttps://github.com/python-semantic-release/python-semantic-release/pull/643,cda050cโhttps://github.com/python-semantic-release/python-semantic-release/commit/cda050cd9e789d81458157ee240ff99ec65c6f25) ๐ญ version_tomlexample inmigrating_from_v7.rstgot corrected, periodt (PR#641โhttps://github.com/python-semantic-release/python-semantic-release/pull/641,325d5e0โhttps://github.com/python-semantic-release/python-semantic-release/commit/325d5e048bd89cb2a94c47029d4878b27311c0f0) ๐
v8.0.1 (2023-07-17)
๐ชฒ Bug Fixes
- Invalid version in Git history should not cause a release failure, we love stability (
PR#632โhttps://github.com/python-semantic-release/python-semantic-release/pull/632,254430bโhttps://github.com/python-semantic-release/python-semantic-release/commit/254430b5cc5f032016b4c73168f0403c4d87541e) ๐
๐ Documentation
- Reduced readthedocs formats and added entries to migration from v7 guide, organized (
9b6ddfeโhttps://github.com/python-semantic-release/python-semantic-release/commit/9b6ddfef448f9de30fa2845034f76655d34a9912) ๐ - migration: hyperlink got fixed, yay (
PR#631โhttps://github.com/python-semantic-release/python-semantic-release/pull/631,5fbd52dโhttps://github.com/python-semantic-release/python-semantic-release/commit/5fbd52d7de4982b5689651201a0e07b445158645) ๐
v8.0.0 (2023-07-16)
โจ Features
- publish-cmd:
--post-to-release-tagoption added to control where to publish, control freak behavior but make it useful (PR#619โhttps://github.com/python-semantic-release/python-semantic-release/pull/619,ec30564โhttps://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) ๐ - Make it easier to access commit messages in
ParsedCommitsโ bestie the commit messages are just right there now, no more digging through layers ๐ซถ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Remove publication of
dists/to artifact repository โ that whole artifact-repo publishing thing? gone, not invited to the party anymore ๐ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Rename 'upload' configuration section to 'publish' โ glow-up on the config naming, she goes by
publishnow โจ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - github-action: Add GitHub Actions output variables โ outputs!! now the action can actually pass things along, iconic behavior ๐ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - version-cmd: Add
--skip-buildoption โ gtfo of the build step, respectfully ๐โโ๏ธ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - version-cmd Add
--strictversion mode โ strict mode has entered the chat, no more vibes-based versioning (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe)
๐ชฒ Bug Fixes
- Add logging for token auth, use token for push โ auth actually tells you what's happening now, and that token is getting used ๐ฅ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Caching for repo owner and name โ why ask twice when you can remember, lowkey genius ๐ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Correct assets type in configuration โ the assets type in config was giving wrong, now it's giving correct ๐
(PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Correct assets type-annotation for
RuntimeContextโ type annotation glow-up, mypy girlies are fed ๐ธ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Correct
DockerfileCLI command and GHA fetch โ the Dockerfile was out here doing the wrong command, we fixed her ๐ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Correct handling of build commands โ build commands handled properly now, no chaos ๐ฆ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Correct logic for generating release notes โ release notes logic said what it said, and she said it wrong, so we fixed her ๐ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) Create_or_update_releasefor Gitlab hvcs โ GitLab girlies, this one's for you ๐ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe)- Make additional attributes available for template authors โ template besties, more little variables to play with, go feral ๐จ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Only call Github Action output callback once defaults are set โ order matters babes, defaults first, then the callback โจ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Remove commit amending behavior โ no more amending commits, she's no longer editing your history behind your back ๐ญ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Resolve branch checkout logic in GHA โ the branch checkout logic in GitHub Actions finally makes sense ๐ซ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Resolve bug in changelog logic, enable upload to pypi โ changelog bug: resolved. pypi upload: enabled. double slay ๐ฅ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Resolve loss of
tag_formatconfiguration โ yourtag_formatconfig was getting lost like a hair tie, we found it ๐ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - github-action: Pin Debian version in
Dockerfileโ pinning Debian so she stops changing her whole personality on us ๐ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - github-action: Correct input parsing โ inputs are parsed correctly now, no more mystery values ๐ฆ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - github-action: Mark container fs as safe for git to operate on โ git needs the "you're safe bestie" tag before touching that filesystem ๐ซถ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - github-action: Quotation for
git configcommand โ quotes added, becausegit configwas NOT reading the room ๐ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - github-action: Remove default for 'force' โ 'force' had a default it should never have had, and now she doesn't ๐
(PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe)
๐ Documentation
- Convert to Furo theme โ docs got a whole new theme, she's Furo now and she's stunning ๐ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Fix typo โ one (1) typo, eliminated ๐ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Remove reference to dist publication โ docs stop talking about dist publication because we stopped doing dist publication, consistency queen ๐ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - Update docs with additional required permissions โ heads up bestie, there are more permissions you need, it's in the docs now ๐ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe) - changelog-templates: fix typo โ typo in the changelog templates, gone, vanished, not here ๐ฆ (PR#619
https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe)
โป๏ธ Refactoring
- Remove
verify-cicommand</mark> โ theverify-cicommand has left the building, bye boo ๐ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe)
๐ฅ BREAKING CHANGES
- numerous breaking changes, see Upgrading to v8
#upgrade-v8for more information โ okay so like, there are numerous breaking changes, this is not a drill, go read the upgrading guide before you update, I'm serious ๐ญ (PR#619https://github.com/python-semantic-release/python-semantic-release/pull/619, ec30564https://github.com/python-semantic-release/python-semantic-release/commit/ec30564b4ec732c001d76d3c09ba033066d2b6fe)
v7.34.6 (2023-06-17)
๐ชฒ Bug Fixes
- Relax invoke dependency constraint โ we loosened the grip on the
invokedependency, she can breathe now ๐ฌ๏ธ (18ea200https://github.com/python-semantic-release/python-semantic-release/commit/18ea200633fd67e07f3d4121df5aa4c6dd29d154)
v7.34.5 (2023-06-17)
๐ชฒ Bug Fixes
- Consider empty commits โ empty commits count too, they're valid and they matter ๐ (PR#608
https://github.com/python-semantic-release/python-semantic-release/pull/608, 6f2e890https://github.com/python-semantic-release/python-semantic-release/commit/6f2e8909636595d3cb5e858f42c63820cda45974)
v7.34.4 (2023-06-15)
๐ชฒ Bug Fixes
- Docker build fails installing git โ the Docker build was throwing hands while installing git, we settled it ๐ณ (PR#605
https://github.com/python-semantic-release/python-semantic-release/pull/605, 9e3eb97https://github.com/python-semantic-release/python-semantic-release/commit/9e3eb979783bc39ca564c2967c6c77eecba682e6)
v7.34.3 (2023-06-01)
๐ชฒ Bug Fixes
- Generate markdown linter compliant changelog headers & lists โ changelog headers and lists that the markdown linter won't yell at, periodt ๐ (PR#597
https://github.com/python-semantic-release/python-semantic-release/pull/597, cc87400https://github.com/python-semantic-release/python-semantic-release/commit/cc87400d4a823350de7d02dc3172d2488c9517db)
v7.34.2 (2023-05-29)
๐ชฒ Bug Fixes
- Open all files with explicit
utf-8encoding โ every file opens with explicitutf-8now, no more encoding roulette ๐ก (PR#596https://github.com/python-semantic-release/python-semantic-release/pull/596, cb71f35https://github.com/python-semantic-release/python-semantic-release/commit/cb71f35c26c1655e675fa735fa880d39a2c8af9c)
v7.34.1 (2023-05-28)
๐ชฒ Bug Fixes
- Generate markdown linter compliant changelog headers & lists โ yes again, markdown-linter-approved headers and lists, consistency is the vibe โจ (PR#594
https://github.com/python-semantic-release/python-semantic-release/pull/594, 9d9d403https://github.com/python-semantic-release/python-semantic-release/commit/9d9d40305c499c907335abe313e3ed122db0b154)
v7.34.0 (2023-05-28)
โจ Features
- Add option to only parse commits for current working directory โ you can now tell her to only parse commits for the current working directory, monorepo besties this one's for you ๐ซถ (PR#509
https://github.com/python-semantic-release/python-semantic-release/pull/509, cdf8116https://github.com/python-semantic-release/python-semantic-release/commit/cdf8116c1e415363b10a01f541873e04ad874220)
๐ v7.33.5 (2023-05-19)
๐ชฒ Bug Fixes (we fixed things, bestie!)
- Update docs and default config for gitmoji changes โ PR#590 (
https://github.com/python-semantic-release/python-semantic-release/pull/590),192da6e(https://github.com/python-semantic-release/python-semantic-release/commit/192da6e1352298b48630423d50191070a1c5ab24) - Update sphinx dep โ PR#590 (
https://github.com/python-semantic-release/python-semantic-release/pull/590),192da6e(https://github.com/python-semantic-release/python-semantic-release/commit/192da6e1352298b48630423d50191070a1c5ab24)
๐ Documentation
- Update broken badge and add links โ PR#591 (
https://github.com/python-semantic-release/python-semantic-release/pull/591),0c23447(https://github.com/python-semantic-release/python-semantic-release/commit/0c234475d27ad887b19170c82deb80293b3a95f1)
๐ธ v7.33.4 (2023-05-14)
๐ชฒ Bug Fixes
- If prerelease, publish prerelease โ PR#587 (
https://github.com/python-semantic-release/python-semantic-release/pull/587),927da9f(https://github.com/python-semantic-release/python-semantic-release/commit/927da9f8feb881e02bc08b33dc559bd8e7fc41ab)
โจ v7.33.3 (2023-04-24)
๐ชฒ Bug Fixes
- Trim emojis from config โ PR#583 (
https://github.com/python-semantic-release/python-semantic-release/pull/583),02902f7(https://github.com/python-semantic-release/python-semantic-release/commit/02902f73ee961565c2470c000f00947d9ef06cb1) - Update Gitmojis according to official node module โ PR#582 (
https://github.com/python-semantic-release/python-semantic-release/pull/582),806fcfa(https://github.com/python-semantic-release/python-semantic-release/commit/806fcfa4cfdd3df4b380afd015a68dc90d54215a)
๐ Documentation
- Grammar in
docs/troubleshooting.rstโ PR#557 (https://github.com/python-semantic-release/python-semantic-release/pull/557),bbe754a(https://github.com/python-semantic-release/python-semantic-release/commit/bbe754a3db9ce7132749e7902fe118b52f48ee42) - Spelling and grammar in
travis.rstโ PR#556 (https://github.com/python-semantic-release/python-semantic-release/pull/556),3a76e9d(https://github.com/python-semantic-release/python-semantic-release/commit/3a76e9d7505c421009eb3e953c32cccac2e70e07) - Update repository name โ PR#559 (
https://github.com/python-semantic-release/python-semantic-release/pull/559),5cdb05e(https://github.com/python-semantic-release/python-semantic-release/commit/5cdb05e20f17b12890e1487c42d317dcbadd06c8)
๐ v7.33.2 (2023-02-17)
๐ชฒ Bug Fixes
- Inconsistent versioning between
print-versionandpublishโ PR#524 (https://github.com/python-semantic-release/python-semantic-release/pull/524),17d60e9(https://github.com/python-semantic-release/python-semantic-release/commit/17d60e9bf66f62e5845065486c9d5e450f74839a)
๐ฆ v7.33.1 (2023-02-01)
๐ชฒ Bug Fixes
- action: Mark container fs as safe for git โ PR#552 (
https://github.com/python-semantic-release/python-semantic-release/pull/552),2a55f68(https://github.com/python-semantic-release/python-semantic-release/commit/2a55f68e2b3cb9ffa9204c00ddbf12706af5c070)
๐ v7.33.0 (2023-01-15)
โจ Features
- Add signing options to action โ
31ad5eb(https://github.com/python-semantic-release/python-semantic-release/commit/31ad5eb5a25f0ea703afc295351104aefd66cac1) - Update action with configuration options โ PR#518 (
https://github.com/python-semantic-release/python-semantic-release/pull/518),4664afe(https://github.com/python-semantic-release/python-semantic-release/commit/4664afe5f80a04834e398fefb841b166a51d95b7) - repository: Add support for
TWINE_CERT, closes #521 (https://github.com/python-semantic-release/python-semantic-release/issues/521) โ PR#522 (https://github.com/python-semantic-release/python-semantic-release/pull/522),d56e85d(https://github.com/python-semantic-release/python-semantic-release/commit/d56e85d1f2ac66fb0b59af2178164ca915dbe163)
๐ชฒ Bug Fixes
- Changelog release commit search logic โ PR#530 (
https://github.com/python-semantic-release/python-semantic-release/pull/530),efb3410(https://github.com/python-semantic-release/python-semantic-release/commit/efb341036196c39b4694ca4bfa56c6b3e0827c6c) - github-actions: Bump Dockerfile to use Python 3.10 image, closes #533 (
https://github.com/python-semantic-release/python-semantic-release/issues/533) โ PR#536 (https://github.com/python-semantic-release/python-semantic-release/pull/536),8f2185d(https://github.com/python-semantic-release/python-semantic-release/commit/8f2185d570b3966b667ac591ae523812e9d2e00f) - action: Fix environment variable names โ
3c66218(https://github.com/python-semantic-release/python-semantic-release/commit/3c66218640044adf263fcf9b2714cfc4b99c2e90)
๐ Documentation
- Update documentation โ
5cbdad2(https://github.com/python-semantic-release/python-semantic-release/commit/5cbdad296034a792c9bf05e3700eac4f847eb469)
๐ v7.32.2 (2022-10-22)
๐ชฒ Bug Fixes
- Fix changelog generation in tag-mode โ PR#171 (
https://github.com/python-semantic-release/python-semantic-release/pull/171),482a62e(https://github.com/python-semantic-release/python-semantic-release/commit/482a62ec374208b2d57675cb0b7f0ab9695849b9)
๐ Documentation
- Fix code blocks โ PR#506 (
https://github.com/python-semantic-release/python-semantic-release/pull/506),24b7673(https://github.com/python-semantic-release/python-semantic-release/commit/24b767339fcef1c843f7dd3188900adab05e03b1)
๐ v7.32.1 (2022-10-07)
๐ชฒ Bug Fixes
- Corrections for deprecation warnings โ PR#505 (
https://github.com/python-semantic-release/python-semantic-release/pull/505),d47afb6(https://github.com/python-semantic-release/python-semantic-release/commit/d47afb6516238939e174f946977bf4880062a622)
๐ Documentation
- Correct spelling mistakes โ PR#504 (
https://github.com/python-semantic-release/python-semantic-release/pull/504),3717e0d(https://github.com/python-semantic-release/python-semantic-release/commit/3717e0d8810f5d683847c7b0e335eeefebbf2921)
๐ v7.32.0 (2022-09-25)
โจ Features
- Add setting for enforcing textual changelog sections, closes #498 (
https://github.com/python-semantic-release/python-semantic-release/issues/498) โ PR#502 (https://github.com/python-semantic-release/python-semantic-release/pull/502),988437d(https://github.com/python-semantic-release/python-semantic-release/commit/988437d21e40d3e3b1c95ed66b535bdd523210de)
๐ Documentation
- Correct documented default behavior for
commit_version_numberโ PR#497 (https://github.com/python-semantic-release/python-semantic-release/pull/497),ffae2dc(https://github.com/python-semantic-release/python-semantic-release/commit/ffae2dc68f7f4bc13c5fd015acd43b457e568ada)
๐ v7.31.4 (2022-08-23)
๐ชฒ Bug Fixes
- Account for trailing newlines in commit messages, closes #490 (
https://github.com/python-semantic-release/python-semantic-release/issues/490) โ PR#495 (https://github.com/python-semantic-release/python-semantic-release/pull/495),111b151(https://github.com/python-semantic-release/python-semantic-release/commit/111b1518e8c8e2bd7535bd4c4b126548da384605)
๐ง v7.31.3 (2022-08-22)
๐ชฒ Bug Fixes
- Use
commit_subjectwhen searching for release commits โ PR#488 (https://github.com/python-semantic-release/python-semantic-release/pull/488),3849ed9(https://github.com/python-semantic-release/python-semantic-release/commit/3849ed992c3cff9054b8690bcf59e49768f84f47)
โญ v7.31.2 (2022-07-29)
๐ชฒ Bug Fixes
- Add better handling of missing changelog placeholder, closes #454 (
https://github.com/python-semantic-release/python-semantic-release/issues/454) โe7a0e81(https://github.com/python-semantic-release/python-semantic-release/commit/e7a0e81c004ade73ed927ba4de8c3e3ccaf0047c) - Add
repo=Nonewhen not in git repo, closes #422 (https://github.com/python-semantic-release/python-semantic-release/issues/422) โ40be804(https://github.com/python-semantic-release/python-semantic-release/commit/40be804c09ab8a036fb135c9c38a63f206d2742c)
๐ Documentation
- Add example for
pyproject.tomlโ2a4b8af(https://github.com/python-semantic-release/python-semantic-release/commit/2a4b8af1c2893a769c02476bb92f760c8522bd7a)
๐ซถ v7.31.1 (2022-07-29)
๐ชฒ Bug Fixes
- Update git email in action, closes #473 (
https://github.com/python-semantic-release/python-semantic-release/issues/473) โ0ece6f2(https://github.com/python-semantic-release/python-semantic-release/commit/0ece6f263ff02a17bb1e00e7ed21c490f72e3d00)
๐ฅ v7.31.0 (2022-07-29)
โจ Features
- Add
prerelease-patchandno-prerelease-patchflags for whether to auto-bump prereleases โb4e5b62(https://github.com/python-semantic-release/python-semantic-release/commit/b4e5b626074f969e4140c75fdac837a0625cfbf6) - Override
repository_urlwREPOSITORY_URLenv var โ PR#439 (https://github.com/python-semantic-release/python-semantic-release/pull/439),cb7578c(https://github.com/python-semantic-release/python-semantic-release/commit/cb7578cf005b8bd65d9b988f6f773e4c060982e3)
๐ชฒ Bug Fixes
- bug fix
get_current_release_versionfortag_onlyversion_source โcad09be(https://github.com/python-semantic-release/python-semantic-release/commit/cad09be9ba067f1c882379c0f4b28115a287fc2b)
๐ v7.30.2 (2022-07-26)
๐ชฒ Bug Fixes
- Declare
additional_optionsas action inputs โ PR#481 (https://github.com/python-semantic-release/python-semantic-release/pull/481),cb5d8c7(https://github.com/python-semantic-release/python-semantic-release/commit/cb5d8c7ce7d013fcfabd7696b5ffb846a8a6f853)
๐ v7.30.1 (2022-07-25)
๐ชฒ Bug Fixes
- Don't use
commit_subjectfor tag pattern matching โ PR#480 (https://github.com/python-semantic-release/python-semantic-release/pull/480),ac3f11e(https://github.com/python-semantic-release/python-semantic-release/commit/ac3f11e689f4a290d20b68b9c5c214098eb61b5f)
๐ธ v7.30.0 (2022-07-25)
โจ Features
- Add
additional_optionsinput for GitHub Action โ PR#477 (https://github.com/python-semantic-release/python-semantic-release/pull/477),aea60e3(https://github.com/python-semantic-release/python-semantic-release/commit/aea60e3d290c6fe3137bff21e0db1ed936233776)
๐ชฒ Bug Fixes
- Allow empty additional options โ PR#479 (
https://github.com/python-semantic-release/python-semantic-release/pull/479),c9b2514(https://github.com/python-semantic-release/python-semantic-release/commit/c9b2514d3e164b20e78b33f60989d78c2587e1df)
okay bestie, the changelog saga keeps rolling and she is NOT slowing down ๐ every date, every PR, every single commit hash is riding with us โ receipts stay receipts:
๐ฆ v7.29.7 (2022-07-24)
๐ชฒ Bug Fixes
- Dependency version bumps are getting ignored when we parse the version out of commit logs โ no more chaos from stray bumps. PR#476 (https://github.com/python-semantic-release/python-semantic-release/pull/476), 51bcb78 (https://github.com/python-semantic-release/python-semantic-release/commit/51bcb780a9f55fadfaf01612ff65c1f92642c2c1)
๐ธ v7.29.6 (2022-07-15)
๐ชฒ Bug Fixes
- You can finally change the prerelease tag with CLI flags โ as the flags intended, fr fr. PR#466 (https://github.com/python-semantic-release/python-semantic-release/pull/466), 395bf4f (https://github.com/python-semantic-release/python-semantic-release/commit/395bf4f2de73663c070f37cced85162d41934213)
๐ v7.29.5 (2022-07-14)
๐ชฒ Bug Fixes
- The
packagingmodule requirement is back in โ she needed it, periodt. PR#469 (https://github.com/python-semantic-release/python-semantic-release/pull/469), b99c9fa (https://github.com/python-semantic-release/python-semantic-release/commit/b99c9fa88dc25e5ceacb131cd93d9079c4fb2c86) publish:grabs the version bump for the current release โ iconic behaviour honestly. PR#467 (https://github.com/python-semantic-release/python-semantic-release/pull/467), dd26888 (https://github.com/python-semantic-release/python-semantic-release/commit/dd26888a923b2f480303c19f1916647de48b02bf)
โจ v7.29.4 (2022-06-29)
๐ชฒ Bug Fixes
- The empty
ValueErrorgot some text in it โ no more silent mystery vibes. PR#461 (https://github.com/python-semantic-release/python-semantic-release/pull/461), 733254a (https://github.com/python-semantic-release/python-semantic-release/commit/733254a99320d8c2f964d799ac4ec29737867faa)
๐ v7.29.3 (2022-06-26)
๐ชฒ Bug Fixes
- Assets upload successfully on custom GitHub servers now โ she said be so fr. PR#458 (https://github.com/python-semantic-release/python-semantic-release/pull/458), 32b516d (https://github.com/python-semantic-release/python-semantic-release/commit/32b516d7aded4afcafe4aa56d6a5a329b3fc371d)
๐ซถ v7.29.2 (2022-06-20)
๐ชฒ Bug Fixes
should_bumpnow checks against the release version when it's not a prerelease โ checking, but make it correct. PR#457 (https://github.com/python-semantic-release/python-semantic-release/pull/457), da0606f (https://github.com/python-semantic-release/python-semantic-release/commit/da0606f0d67ada5f097c704b9423ead3b5aca6b2)
๐ v7.29.1 (2022-06-01)
๐ชฒ Bug Fixes
- Correct release version gets captured when the patch has more than one digit โ multi-digit patches were lowkey getting fumbled, not anymore. PR#448 (https://github.com/python-semantic-release/python-semantic-release/pull/448), 426cdc7 (https://github.com/python-semantic-release/python-semantic-release/commit/426cdc7d7e0140da67f33b6853af71b2295aaac2)
๐ v7.29.0 (2022-05-27)
โจ Features
- Push the version with an
ssh-keywhile publishing to the HVCS with a token โ you can split those two jobs now, main character energy. PR#419 (https://github.com/python-semantic-release/python-semantic-release/pull/419), 7b2dffa (https://github.com/python-semantic-release/python-semantic-release/commit/7b2dffadf43c77d5e0eea307aefcee5c7744df5c) config:newignore_token_for_pushparam has entered the chat โ iconic, no notes. PR#419 (https://github.com/python-semantic-release/python-semantic-release/pull/419), 7b2dffa (https://github.com/python-semantic-release/python-semantic-release/commit/7b2dffadf43c77d5e0eea307aefcee5c7744df5c)
๐ชฒ Bug Fixes
- Prerelease got fixed and refactored โ spring cleaning but make it prerelease. PR#435 (https://github.com/python-semantic-release/python-semantic-release/pull/435), 94c9494 (https://github.com/python-semantic-release/python-semantic-release/commit/94c94942561f85f48433c95fd3467e03e0893ab4)
test:overrides theGITHUB_ACTORenv โ so the tests stop acting brand new. PR#419 (https://github.com/python-semantic-release/python-semantic-release/pull/419), 7b2dffa (https://github.com/python-semantic-release/python-semantic-release/commit/7b2dffadf43c77d5e0eea307aefcee5c7744df5c)
๐ Documentation
- Docs for
ignore_token_for_pushdropped โ she wrote it down so we'd all know. PR#419 (https://github.com/python-semantic-release/python-semantic-release/pull/419), 7b2dffa (https://github.com/python-semantic-release/python-semantic-release/commit/7b2dffadf43c77d5e0eea307aefcee5c7744df5c)
๐ v7.28.1 (2022-04-14)
๐ชฒ Bug Fixes
- Getting the current version works when
version_source=tag_onlyโ the tag-only girlies are fed. PR#437 (https://github.com/python-semantic-release/python-semantic-release/pull/437), b247936 (https://github.com/python-semantic-release/python-semantic-release/commit/b247936a81c0d859a34bf9f17ab8ca6a80488081)
๐ v7.28.0 (2022-04-11)
โจ Features
tag_onlyoption forversion_sourceexists now, and it closes #354 (https://github.com/python-semantic-release/python-semantic-release/issues/354) โ absolutely slayed. PR#436 (https://github.com/python-semantic-release/python-semantic-release/pull/436), cf74339 (https://github.com/python-semantic-release/python-semantic-release/commit/cf743395456a86c62679c2c0342502af043bfc3b)
๐ง v7.27.1 (2022-04-03)
๐ชฒ Bug Fixes
prerelease:the prerelease option gets passed through toget_current_versionโ communication! we love to see it. PR#432 (https://github.com/python-semantic-release/python-semantic-release/pull/432), aabab0b (https://github.com/python-semantic-release/python-semantic-release/commit/aabab0b7ce647d25e0c78ae6566f1132ece9fcb9)
๐ v7.27.0 (2022-03-15)
โจ Features
git-lfshopped into the docker container โ she's moving in, she pays rent. PR#427 (https://github.com/python-semantic-release/python-semantic-release/pull/427), 184e365 (https://github.com/python-semantic-release/python-semantic-release/commit/184e3653932979b82e5a62b497f2a46cbe15ba87)
๐ฅ v7.26.0 (2022-03-07)
โจ Features
publish-cmd:new--prereleaseCLI flag turns on prerelease versioning โ flag era begins. PR#413 (https://github.com/python-semantic-release/python-semantic-release/pull/413), 7064265 (https://github.com/python-semantic-release/python-semantic-release/commit/7064265627a2aba09caa2873d823b594e0e23e77)version-cmd:same deal,--prereleaseCLI flag enables prerelease versioning โ twins. PR#413 (https://github.com/python-semantic-release/python-semantic-release/pull/413), 7064265 (https://github.com/python-semantic-release/python-semantic-release/commit/7064265627a2aba09caa2873d823b594e0e23e77)
๐ Documentation
- Basic info about prerelease versioning got written down โ the lore is documented. PR#413 (https://github.com/python-semantic-release/python-semantic-release/pull/413), 7064265 (https://github.com/python-semantic-release/python-semantic-release/commit/7064265627a2aba09caa2873d823b594e0e23e77)
๐ฆ v7.25.2 (2022-02-24)
๐ชฒ Bug Fixes
gitea:asset upload uses form-data now โ the correct format, finally. PR#421 (https://github.com/python-semantic-release/python-semantic-release/pull/421), e011944 (https://github.com/python-semantic-release/python-semantic-release/commit/e011944987885f75b80fe16a363f4befb2519a91)
โญ v7.25.1 (2022-02-23)
๐ชฒ Bug Fixes
gitea:build status and asset upload got handled โ the gitea saga continues. PR#420 (https://github.com/python-semantic-release/python-semantic-release/pull/420), 57db81f (https://github.com/python-semantic-release/python-semantic-release/commit/57db81f4c6b96da8259e3bad9137eaccbcd10f6e)gitea:list build status responses are actually handled โ reading comprehension, we love her. PR#420 (https://github.com/python-semantic-release/python-semantic-release/pull/420), 57db81f (https://github.com/python-semantic-release/python-semantic-release/commit/57db81f4c6b96da8259e3bad9137eaccbcd10f6e)
๐ v7.25.0 (2022-02-17)
โจ Features
hvcs:gitea support is here โ new platform just dropped. PR#412 (https://github.com/python-semantic-release/python-semantic-release/pull/412), b7e7936 (https://github.com/python-semantic-release/python-semantic-release/commit/b7e7936331b7939db09abab235c8866d800ddc1a)
๐ Documentation
tag_commitgot documented, and it closes #410 (https://github.com/python-semantic-release/python-semantic-release/issues/410) โ receipts included. b631ca0 (https://github.com/python-semantic-release/python-semantic-release/commit/b631ca0a79cb2d5499715d43688fc284cffb3044)
๐ซ v7.24.0 (2022-01-24)
โจ Features
- Release commits can include additional changes now โ more room in the commit, more chaos, more fun. 3e34f95 (https://github.com/python-semantic-release/python-semantic-release/commit/3e34f957ff5a3ec6e6f984cc4a79a38ce4391ea9)
๐ v7.23.0 (2021-11-30)
โจ Features
- Github Enterprise server support says hi โ enterprise besties, she sees you. b4e01f1 (https://github.com/python-semantic-release/python-semantic-release/commit/b4e01f1b7e841263fa84f57f0ac331f7c0b31954)
๐ชฉ v7.22.0 (2021-11-21)
โจ Features
parser_angular:the parser accepts customization โ make her yours. 298eebb (https://github.com/python-semantic-release/python-semantic-release/commit/298eebbfab5c083505036ba1df47a5874a1eed6e)
๐ชฒ Bug Fixes
- PR feedback on
parser_angular.pygot addressed โ we listened, we fixed, we moved on. f7bc458 (https://github.com/python-semantic-release/python-semantic-release/commit/f7bc45841e6a5c762f99f936c292cee25fabcd02)
๐ v7.21.0 (2021-11-21)
โจ Features
- Env vars from gitlab-ci or github actions get used now, closing #363 (https://github.com/python-semantic-release/python-semantic-release/issues/363) โ she reads the room, literally. 8ca8dd4 (https://github.com/python-semantic-release/python-semantic-release/commit/8ca8dd40f742f823af147928bd75a9577c50d0fd)
๐ชฒ Bug Fixes
- The invalid repository exception got removed โ bye bestie, you were not serving. 746b62d (https://github.com/python-semantic-release/python-semantic-release/commit/746b62d4e207a5d491eecd4ca96d096eb22e3bed)
๐งธ v7.20.0 (2021-11-21)
โจ Features
- Custom environment variable names are allowed โ name them whatever, she's not judging. PR#392 (https://github.com/python-semantic-release/python-semantic-release/pull/392), 372cda3 (https://github.com/python-semantic-release/python-semantic-release/commit/372cda3497f16ead2209e6e1377d38f497144883)
- The Twine adapter got rewritten so it uploads to artifact repositories โ glow up for the adapter. cfb20af (https://github.com/python-semantic-release/python-semantic-release/commit/cfb20af79a8e25a77aee9ff72deedcd63cb7f62f)
๐ชฒ Bug Fixes
- No more linux commands on windows โ she adapted, she's multilingual. PR#393 (https://github.com/python-semantic-release/python-semantic-release/pull/393), 5bcccd2 (https://github.com/python-semantic-release/python-semantic-release/commit/5bcccd21cc8be3289db260e645fec8dc6a592abd)
- Mypy errors in
vcs_helpersgot handled โ type checker, she is satisfied. 13ca0fe (https://github.com/python-semantic-release/python-semantic-release/commit/13ca0fe650125be2f5e953f6193fdc4d44d3c75a) - Removing the build folder gets skipped when it isn't there โ no deleting things that don't exist! 8e79fdc (https://github.com/python-semantic-release/python-semantic-release/commit/8e79fdc107ffd852a91dfb5473e7bd1dfaba4ee5)
๐ Documentation
- Typos got cleaned up and a repository upload section appeared โ the docs ate, fr. 1efa18a (https://github.com/python-semantic-release/python-semantic-release/commit/1efa18a3a55134d6bc6e4572ab025e24082476cd)
๐ฆ v7.19.2 (2021-09-04)
๐ชฒ Bug Fixes
- The
ImproperConfigimport error is fixed โ that one was giving broken. PR#377 (https://github.com/python-semantic-release/python-semantic-release/pull/377), b011a95 (https://github.com/python-semantic-release/python-semantic-release/commit/b011a9595df4240cb190bfb1ab5b6d170e430dfc)
v7.19.1 (2021-08-17) ๐
๐ชฒ Bug Fixes
- Okay bestie, they added a
get_formatted_taghelper so we're not hardcoding thatv-prefix in the git tags anymore. It's giving โจclean codeโจ. (commit:1a354c8<https://github.com/python-semantic-release/python-semantic-release/commit/1a354c86abad77563ebce9a6944256461006f3c7>)
v7.19.0 (2021-08-16) โจ
โจ Features
- Custom git tag format support is HERE! You can finally make your tags look however you want. Slay. ๐
(PR#373 <https://github.com/python-semantic-release/python-semantic-release/pull/373>,
1d76632<https://github.com/python-semantic-release/python-semantic-release/commit/1d76632043bf0b6076d214a63c92013624f4b95e>)
๐ Documentation
- configuration: They defined
tag_formatusage and what effect it has. So now you know what's up. ๐ (PR#373 <https://github.com/python-semantic-release/python-semantic-release/pull/373>,1d76632<https://github.com/python-semantic-release/python-semantic-release/commit/1d76632043bf0b6076d214a63c92013624f4b95e>) - parser: Documentation for scipy-parser got added. SciPy besties, we see you. ๐ (commit:
45ee34a<https://github.com/python-semantic-release/python-semantic-release/commit/45ee34aa21443860a6c2cd44a52da2f353b960bf>)
v7.18.0 (2021-08-09) ๐
โจ Features
- Add support for non-prefixed tags! So you can be tag-free and fancy. Live your truth. ๐ (PR#366 <https://github.com/python-semantic-release/python-semantic-release/pull/366>,
0fee4dd<https://github.com/python-semantic-release/python-semantic-release/commit/0fee4ddb5baaddf85ed6b76e76a04474a5f97d0a>)
๐ Documentation
- Clarify second argument of
ParsedCommit. Now you know exactly what goes where. ๐ค (commit:086ddc2<https://github.com/python-semantic-release/python-semantic-release/commit/086ddc28f06522453328f5ea94c873bd202ff496>)
v7.17.0 (2021-08-07) ๐ฆ
โจ Features
- parser: Add scipy style parser! It's giving very academic, very demure. ๐ฌ (PR#369 <https://github.com/python-semantic-release/python-semantic-release/pull/369>,
51a3921<https://github.com/python-semantic-release/python-semantic-release/commit/51a39213ea120c4bbd7a57b74d4f0cc3103da9f5>)
v7.16.4 (2021-08-03) ๐
๐ชฒ Bug Fixes
- Correct rendering of gitlab issue references, and it closes #358! Finally, GitLab girlies can see their issues properly. ๐ค (commit:
07429ec<https://github.com/python-semantic-release/python-semantic-release/commit/07429ec4a32d32069f25ec77b4bea963bd5d2a00>) (issue: #358 <https://github.com/python-semantic-release/python-semantic-release/issues/358>)
v7.16.3 (2021-07-29) ๐
๐ชฒ Bug Fixes
- Print right info if token is not set, and it closes #360! No more confusing messages when you forget your token. We've all been there. ๐ (PR#361 <https://github.com/python-semantic-release/python-semantic-release/pull/361>,
a275a7a<https://github.com/python-semantic-release/python-semantic-release/commit/a275a7a17def85ff0b41d254e4ee42772cce1981>) (issue: #360 <https://github.com/python-semantic-release/python-semantic-release/issues/360>)
v7.16.2 (2021-06-25) ๐ธ
๐ชฒ Bug Fixes
- Use release-api for gitlab! GitLab besties, we got you. ๐ฆ (commit:
1ef5cab<https://github.com/python-semantic-release/python-semantic-release/commit/1ef5caba2d8dd0f2647bc51ede0ef7152d8b7b8d>)
๐ Documentation
- Recommend setting a concurrency group for GitHub Actions. Yes, do it. ๐ฆ (commit:
34b0735<https://github.com/python-semantic-release/python-semantic-release/commit/34b07357ab3f4f4aa787b71183816ec8aaf334a8>) - Update trove classifiers to reflect supported versions. Keeping it accurate, periodt. โ
(PR#344 <https://github.com/python-semantic-release/python-semantic-release/pull/344>,
7578004<https://github.com/python-semantic-release/python-semantic-release/commit/7578004ed4b20c2bd553782443dfd77535faa377>)
v7.16.1 (2021-06-08) ๐
๐ชฒ Bug Fixes
- Tomlkit should stay at 0.7.0. So they pinned it. Don't @ me. ๐ (commit:
769a5f3<https://github.com/python-semantic-release/python-semantic-release/commit/769a5f31115cdb1f43f19a23fe72b96a8c8ba0fc>)
v7.16.0 (2021-06-08) โจ
โจ Features
- Add option to omit tagging! Sometimes you just don't wanna tag. We get it. ๐ท๏ธ (PR#341 <https://github.com/python-semantic-release/python-semantic-release/pull/341>,
20603e5<https://github.com/python-semantic-release/python-semantic-release/commit/20603e53116d4f05e822784ce731b42e8cbc5d8f>)
v7.15.6 (2021-06-08) ๐
๐ชฒ Bug Fixes
- Update click and tomlkit. Keeping dependencies fresh. ๐ฟ (PR#339 <https://github.com/python-semantic-release/python-semantic-release/pull/339>,
947ea3b<https://github.com/python-semantic-release/python-semantic-release/commit/947ea3bc0750735941446cf4a87bae20e750ba12>)
v7.15.5 (2021-05-26) ๐ง
๐ชฒ Bug Fixes
- Pin tomlkit to 0.7.0. Because sometimes you gotta lock it down. ๐ (commit:
2cd0db4<https://github.com/python-semantic-release/python-semantic-release/commit/2cd0db4537bb9497b72eb496f6bab003070672ab>)
v7.15.4 (2021-04-29) ๐ญ
๐ชฒ Bug Fixes
- Change log level of failed toml loading, and it closes #235! Less spam, more clarity. ๐ (commit:
24bb079<https://github.com/python-semantic-release/python-semantic-release/commit/24bb079cbeff12e7043dd35dd0b5ae03192383bb>) (issue: #235 <https://github.com/python-semantic-release/python-semantic-release/issues/235>)
v7.15.3 (2021-04-03) ๐
๐ชฒ Bug Fixes
- Add venv to path in github action. So it can find its friends. ๐ค (commit:
583c5a1<https://github.com/python-semantic-release/python-semantic-release/commit/583c5a13e40061fc544b82decfe27a6c34f6d265>)
v7.15.2 (2021-04-03) ๐
๐ชฒ Bug Fixes
- Run semantic-release in virtualenv in the github action, and it closes #331! Virtualenv for the win. ๐ (commit:
b508ea9<https://github.com/python-semantic-release/python-semantic-release/commit/b508ea9f411c1cd4f722f929aab9f0efc0890448>) (issue: #331 <https://github.com/python-semantic-release/python-semantic-release/issues/331>) - Set correct path for venv in action script. (commit:
aac02b5<https://github.com/python-semantic-release/python-semantic-release/commit/aac02b5a44a6959328d5879578aa3536bdf856c2>) - Use absolute path for venv in github action. (commit:
d4823b3<https://github.com/python-semantic-release/python-semantic-release/commit/d4823b3b6b1fcd5c33b354f814643c9aaf85a06a>)
๐ Documentation
- Clarify that HVCS should be lowercase, and it closes #330! lowercase vibes only. ๐ก (commit:
da0ab0c<https://github.com/python-semantic-release/python-semantic-release/commit/da0ab0c62c4ce2fa0d815e5558aeec1a1e23bc89>) (issue: #330 <https://github.com/python-semantic-release/python-semantic-release/issues/330>)
v7.15.1 (2021-03-26) ๐
๐ชฒ Bug Fixes
- Add support for setting
build_commandto "false", and it closes #328! Sometimes you just don't wanna build. ๐ (commit:520cf1e<https://github.com/python-semantic-release/python-semantic-release/commit/520cf1eaa7816d0364407dbd17b5bc7c79806086>) (issue: #328 <https://github.com/python-semantic-release/python-semantic-release/issues/328>) - Upgrade python-gitlab range, and it closes #329! (commit:
abfacc4<https://github.com/python-semantic-release/python-semantic-release/commit/abfacc432300941d57488842e41c06d885637e6c>) (issue: #329 <https://github.com/python-semantic-release/python-semantic-release/issues/329>)
๐ Documentation
- Add common options to documentation, and it closes #327! More docs, more better. ๐ (commit:
20d79a5<https://github.com/python-semantic-release/python-semantic-release/commit/20d79a51bffa26d40607c1b77d10912992279112>) (issue: #327 <https://github.com/python-semantic-release/python-semantic-release/issues/327>)
v7.15.0 (2021-02-18) โจ
โจ Features
- Allow the use of
.pypircfor twine uploads! So you can keep your secrets secret. ๐คซ (PR#325 <https://github.com/python-semantic-release/python-semantic-release/pull/325>,6bc56b8<https://github.com/python-semantic-release/python-semantic-release/commit/6bc56b8aa63069a25a828a2d1a9038ecd09b7d5d>)
๐ Documentation
- Add documentation for releasing on a Jenkins instance. Jenkins besties, we see you. ๐งโ๐ป (PR#324 <https://github.com/python-semantic-release/python-semantic-release/pull/324>,
77ad988<https://github.com/python-semantic-release/python-semantic-release/commit/77ad988a2057be59e4559614a234d6871c06ee37>)
v7.14.0 (2021-02-11) ๐
โจ Features
- checks: Add support for Jenkins CI! Jenkins squad, rise up. ๐งก (PR#322 <https://github.com/python-semantic-release/python-semantic-release/pull/322>,
3e99855<https://github.com/python-semantic-release/python-semantic-release/commit/3e99855c6bc72b3e9a572c58cc14e82ddeebfff8>)
๐ Documentation
- Correct casing on proper nouns. (PR#320 <https://github.com/python-semantic-release/python-semantic-release/pull/320>,
d51b999<https://github.com/python-semantic-release/python-semantic-release/commit/d51b999a245a4e56ff7a09d0495c75336f2f150d>) - Correcting Python casing. (PR#320 <https://github.com/python-semantic-release/python-semantic-release/pull/320>,
d51b999<https://github.com/python-semantic-release/python-semantic-release/commit/d51b999a245a4e56ff7a09d0495c75336f2f150d>) - Correcting Semantic Versioning casing. (PR#320 <https://github.com/python-semantic-release/python-semantic-release/pull/320>,
d51b999<https://github.com/python-semantic-release/python-semantic-release/commit/d51b999a245a4e56ff7a09d0495c75336f2f150d>)
v7.13.2 (2021-01-29) ๐
๐ชฒ Bug Fixes
- Crash when TOML has no PSR section! And they fixed it. (PR#319 <https://github.com/python-semantic-release/python-semantic-release/pull/319>,
5f8ab99<https://github.com/python-semantic-release/python-semantic-release/commit/5f8ab99bf7254508f4b38fcddef2bdde8dd15a4c>) - Fix crash when TOML has no PSR section. (PR#319 <https://github.com/python-semantic-release/python-semantic-release/pull/319>,
5f8ab99<https://github.com/python-semantic-release/python-semantic-release/commit/5f8ab99bf7254508f4b38fcddef2bdde8dd15a4c>)
๐ Documentation
- Fix version_toml example for Poetry. (PR#318 <https://github.com/python-semantic-release/python-semantic-release/pull/318>,
39acb68<https://github.com/python-semantic-release/python-semantic-release/commit/39acb68bfffe8242040e476893639ba26fa0d6b5>)
v7.13.1 (2021-01-26) ๐
๐ชฒ Bug Fixes
- Use multiline version_pattern match in replace, and it closes #306! Multiline for the win. ๐ (PR#315 <https://github.com/python-semantic-release/python-semantic-release/pull/315>,
1a85af4<https://github.com/python-semantic-release/python-semantic-release/commit/1a85af434325ce52e11b49895e115f7a936e417e>) (issue: #306 <https://github.com/python-semantic-release/python-semantic-release/issues/306>)
v7.13.0 (2021-01-26) โจ
โจ Features
- Support toml files for version declaration! It closes #245 and #275. TOML gang. ๐ (PR#307 <https://github.com/python-semantic-release/python-semantic-release/pull/307>,
9b62a7e<https://github.com/python-semantic-release/python-semantic-release/commit/9b62a7e377378667e716384684a47cdf392093fa>) (issues: #245 <https://github.com/python-semantic-release/python-semantic-release/issues/245>, #275 <https://github.com/python-semantic-release/python-semantic-release/issues/275>)
v7.12.0 (2021-01-25) ๐ฅ
โจ Features
- github: Retry GitHub API requests on failure! Because sometimes the API just needs a second chance. ๐ฃ (PR#314 <https://github.com/python-semantic-release/python-semantic-release/pull/314>,
ac241ed<https://github.com/python-semantic-release/python-semantic-release/commit/ac241edf4de39f4fc0ff561a749fa85caaf9e2ae>)
๐ชฒ Bug Fixes
- github: Add retries to github API requests. Same PR, same commit. (PR#314 <https://github.com/python-semantic-release/python-semantic-release/pull/314>,
ac241ed<https://github.com/python-semantic-release/python-semantic-release/commit/ac241edf4de39f4fc0ff561a749fa85caaf9e2ae>)
๐ Documentation
- actions: Pat must be passed to checkout step too, closes #311 ๐
โ issue link
https://github.com/python-semantic-release/python-semantic-release/issues/311โ commite2d8e47โจhttps://github.com/python-semantic-release/python-semantic-release/commit/e2d8e47d2b02860881381318dcc088e150c0fcde
v7.11.0 (2021-01-08)
โจ Features
- print-version: Add print-version command to output version, like finally we can just yell the version number at the terminal ๐ฃ๏ธ โ commit
512e3d9๐https://github.com/python-semantic-release/python-semantic-release/commit/512e3d92706055bdf8d08b7c82927d3530183079
๐ชฒ Bug Fixes
- Add dot to
--defineoption help, that one single dot was doing the most ๐ โ commiteb4107d๐https://github.com/python-semantic-release/python-semantic-release/commit/eb4107d2efdf8c885c8ae35f48f1b908d1fced32 - Avoid
Unknown bump level 0message, no more ghost errors jumpscaring bestie ๐ป โ commit8ab624cโญhttps://github.com/python-semantic-release/python-semantic-release/commit/8ab624cf3508b57a9656a0a212bfee59379d6f8b - actions: Fix github actions with new main location, the pipeline was lost but now she's found ๐งญ โ commit
6666672๐https://github.com/python-semantic-release/python-semantic-release/commit/6666672d3d97ab7cdf47badfa3663f1a69c2dbdf
โ๏ธ Build System
- Add
__main__.pymagic file ๐ช, lowkey iconic of it โ commite93f36a๐ซhttps://github.com/python-semantic-release/python-semantic-release/commit/e93f36a7a10e48afb42c1dc3d860a5e2a07cf353
v7.10.0 (2021-01-08)
โจ Features
- build: Allow falsy values for
build_commandto disable build step, so you can just say "no thanks bestie" to the build step ๐ซถ โ commitc07a440๐ธhttps://github.com/python-semantic-release/python-semantic-release/commit/c07a440f2dfc45a2ad8f7c454aaac180c4651f70
๐ Documentation
- Fix incorrect reference syntax, the links were linking wrong and honestly same ๐ โ commit
42027f0๐ฆhttps://github.com/python-semantic-release/python-semantic-release/commit/42027f0d2bb64f4c9eaec65112bf7b6f67568e60 - Rewrite getting started page, the glow-up was real โจ โ commit
97a9046๐https://github.com/python-semantic-release/python-semantic-release/commit/97a90463872502d1207890ae1d9dd008b1834385
v7.9.0 (2020-12-21)
โจ Features
- hvcs: Add
hvcs_domainconfig option, closes #277 ๐ฅ โ issuehttps://github.com/python-semantic-release/python-semantic-release/issues/277โ commitab3061a๐https://github.com/python-semantic-release/python-semantic-release/commit/ab3061ae93c49d71afca043b67b361e2eb2919e6
๐ชฒ Bug Fixes
- history: Coerce version to string, versions said "I am not a string today" and we fixed that ๐ โ PR#298
https://github.com/python-semantic-release/python-semantic-release/pull/298โ commitd4cdc3d๐https://github.com/python-semantic-release/python-semantic-release/commit/d4cdc3d3cd2d93f2a78f485e3ea107ac816c7d00 - history: Require
semver >= 2.10, setting a boundary, we love healthy relationships ๐ โ commit5087e54๐https://github.com/python-semantic-release/python-semantic-release/commit/5087e549399648cf2e23339a037b33ca8b62d954
v7.8.2 (2020-12-19)
โจ Features
- repository: Add to settings artifact repository, giving the settings somewhere to put her stuff ๐ โ commit
f4ef373๐https://github.com/python-semantic-release/python-semantic-release/commit/f4ef3733b948282fba5a832c5c0af134609b26d2
๐ชฒ Bug Fixes
- cli: Skip
remove_distwhere not needed, we stopped doing the thing that didn't need doing, growth ๐ฑ โ commit04817d4โญhttps://github.com/python-semantic-release/python-semantic-release/commit/04817d4ecfc693195e28c80455bfbb127485f36b
v7.8.1 (2020-12-18)
๐ชฒ Bug Fixes
- Filenames with unknown mimetype are now properly uploaded to github release, no more "who dis" files left behind ๐ฆ โ commit
f3ece78๐ฆhttps://github.com/python-semantic-release/python-semantic-release/commit/f3ece78b2913e70f6b99907b192a1e92bbfd6b77 - logs: Fix
TypeErrorwhen enabling debug logs, the debug logs were screaming and now they whisper politely ๐ญ โ commit2591a94๐ซhttps://github.com/python-semantic-release/python-semantic-release/commit/2591a94115114c4a91a48f5b10b3954f6ac932a1
v7.8.0 (2020-12-18)
โจ Features
- Add
upload_to_pypi_glob_patternsoption, glob patterns for your uploads, she contains multitudes ๐ธ โ commit42305ed๐https://github.com/python-semantic-release/python-semantic-release/commit/42305ed499ca08c819c4e7e65fcfbae913b8e6e1
๐ชฒ Bug Fixes
- changelog: Use "issues" link vs "pull", the link had an identity crisis and now she knows herself ๐
โ commit
93e48c9โจhttps://github.com/python-semantic-release/python-semantic-release/commit/93e48c992cb8b763f430ecbb0b7f9c3ca00036e4 - netrc: Prefer using token defined in
GH_TOKENinstead of.netrcfile,GH_TOKENis the main character now ๐ โ commit3af32a7๐https://github.com/python-semantic-release/python-semantic-release/commit/3af32a738f2f2841fd75ec961a8f49a0b1c387cf
v7.7.0 (2020-12-12)
โจ Features
- changelog: Add PR links in markdown, so the PRs get their moment in the sun โ๏ธ โ PR#282
https://github.com/python-semantic-release/python-semantic-release/pull/282โ commit0448f6c๐https://github.com/python-semantic-release/python-semantic-release/commit/0448f6c350bbbf239a81fe13dc5f45761efa7673
v7.6.0 (2020-12-06)
โจ Features
- Add
major_on_zerooption, honoring the 0.x lifestyle fr fr ๐ซถ โ commitd324154๐https://github.com/python-semantic-release/python-semantic-release/commit/d3241540e7640af911eb24c71e66468feebb0d46
๐ Documentation
- Add documentation for option
major_on_zero, because an undocumented option is just a mystery ๐ต๏ธ โ commit2e8b26eโญhttps://github.com/python-semantic-release/python-semantic-release/commit/2e8b26e4ee0316a2cf2a93c09c783024fcd6b3ba
v7.5.0 (2020-12-04)
โจ Features
- logs: Include scope in changelogs, scopes are getting the recognition they deserve ๐ฃ โ PR#281
https://github.com/python-semantic-release/python-semantic-release/pull/281โ commit21c96b6๐ฆhttps://github.com/python-semantic-release/python-semantic-release/commit/21c96b688cc44cc6f45af962ffe6d1f759783f37
v7.4.1 (2020-12-04)
๐ชฒ Bug Fixes
- Add
"changelog_capitalize"to flags, closes #278, capital C where it belongs ๐ โ issuehttps://github.com/python-semantic-release/python-semantic-release/issues/278โ PR#279https://github.com/python-semantic-release/python-semantic-release/pull/279โ commit37716df๐https://github.com/python-semantic-release/python-semantic-release/commit/37716dfa78eb3f848f57a5100d01d93f5aafc0bf
v7.4.0 (2020-11-24)
โจ Features
- Add
changelog_capitalizeconfiguration, closes #260, YES we're capitalizing, no cap ๐งข โ issuehttps://github.com/python-semantic-release/python-semantic-release/issues/260โ commit7cacca1๐ธhttps://github.com/python-semantic-release/python-semantic-release/commit/7cacca1eb436a7166ba8faf643b53c42bc32a6a7
๐ Documentation
- Fix broken internal references, the links were on life support and we revived them ๐ซถ โ PR#270
https://github.com/python-semantic-release/python-semantic-release/pull/270โ commitda20b9bโจhttps://github.com/python-semantic-release/python-semantic-release/commit/da20b9bdd3c7c87809c25ccb2a5993a7ea209a22 - Update links to Github docs, fresh links, fresh me ๐ โ PR#268
https://github.com/python-semantic-release/python-semantic-release/pull/268โ commitc53162e๐ซhttps://github.com/python-semantic-release/python-semantic-release/commit/c53162e366304082a3bd5d143b0401da6a16a263
v7.3.0 (2020-09-28)
โจ Features
- Generate
changelog.mdfile, a whole file just for the receipts ๐งพ โ PR#266https://github.com/python-semantic-release/python-semantic-release/pull/266โ commit2587dfe๐https://github.com/python-semantic-release/python-semantic-release/commit/2587dfed71338ec6c816f58cdf0882382c533598
๐ Documentation
- Fix docstring, the docstring got a lil edit and honestly she needed it ๐
โ commit
5a5e2cf๐https://github.com/python-semantic-release/python-semantic-release/commit/5a5e2cfb5e6653fb2e95e6e23e56559953b2c2b4
v7.2.5 (2020-09-16)
๐ชฒ Bug Fixes
- Add required to inputs in action metadata, the action metadata was out here winging it, no more ๐ซ โ PR#264
https://github.com/python-semantic-release/python-semantic-release/pull/264โ commite76b255โญhttps://github.com/python-semantic-release/python-semantic-release/commit/e76b255cf7d3d156e3314fc28c54d63fa126e973
v7.2.4 (2020-09-14)
๐ชฒ Bug Fixes
- Use range for
tomldependency, closes #241, givingtomlsome breathing room ๐ฌ๏ธ โ issuehttps://github.com/python-semantic-release/python-semantic-release/issues/241โ commit45707e1๐ฆhttps://github.com/python-semantic-release/python-semantic-release/commit/45707e1b7dcab48103a33de9d7f9fdb5a34dae4a
v7.2.3 (2020-09-12)
๐ชฒ Bug Fixes
- Support multiline
version_patternmatching by default, multiple lines? she can handle it ๐ช โ commit82f7849๐https://github.com/python-semantic-release/python-semantic-release/commit/82f7849dcf29ba658e0cb3b5d21369af8bf3c16f
๐ Documentation
- Create 'getting started' instructions, the onboarding arc begins ๐ฑ โ PR#256
https://github.com/python-semantic-release/python-semantic-release/pull/256โ commit5f4d000โจhttps://github.com/python-semantic-release/python-semantic-release/commit/5f4d000c3f153d1d23128acf577e389ae879466e - Link to getting started guide in README, showing off the guide in the README like a proud bestie ๐ โ commit
f490e01๐https://github.com/python-semantic-release/python-semantic-release/commit/f490e0194fa818db4d38c185bc5e6245bfde546b
v7.2.2 (2020-07-26)
๐ชฒ Bug Fixes
- changelog: Send changelog to
stdout, closes #250, the changelog was hidden and now she's on the big screen ๐ฌ โ issuehttps://github.com/python-semantic-release/python-semantic-release/issues/250โ commit87e2bb8๐https://github.com/python-semantic-release/python-semantic-release/commit/87e2bb881387ff3ac245ab9923347a5a616e197b
๐ Documentation
- Add quotation marks to the
pipcommands inCONTRIBUTING.rst, quotes are just good manners ๐ โ PR#253https://github.com/python-semantic-release/python-semantic-release/pull/253โ commite20fa43๐https://github.com/python-semantic-release/python-semantic-release/commit/e20fa43098c06f5f585c81b9cd7e287dcce3fb5d
v7.2.1 (2020-06-29)
๐ชฒ Bug Fixes
- Commit all files with bumped versions, ALL of them, every single one, no stragglers ๐ โ PR#249
https://github.com/python-semantic-release/python-semantic-release/pull/249โ commitb3a1766๐ฆhttps://github.com/python-semantic-release/python-semantic-release/commit/b3a1766be7edb7d2eb76f2726d35ab8298688b3b
๐ Documentation
- Give example of multiple build commands, an example, because vibes alone don't compile ๐ โ PR#248
https://github.com/python-semantic-release/python-semantic-release/pull/248โ commit65f1ffcโจhttps://github.com/python-semantic-release/python-semantic-release/commit/65f1ffcc6cac3bf382f4b821ff2be59d04f9f867
v7.2.0 (2020-06-15)
โจ Features
- Bump versions in multiple files, closes #175, one version, so many files, she's everywhere ๐
โ issue
https://github.com/python-semantic-release/python-semantic-release/issues/175โ PR#246https://github.com/python-semantic-release/python-semantic-release/pull/246โ commit0ba2c47๐https://github.com/python-semantic-release/python-semantic-release/commit/0ba2c473c6e44cc326b3299b6ea3ddde833bdb37
v7.1.1 (2020-05-28)
๐ชฒ Bug Fixes
- changelog: Swap sha and message in table changelog, they were sitting in each other's seats, awkward ๐ญ โ commit
6741370๐ซhttps://github.com/python-semantic-release/python-semantic-release/commit/6741370ab09b1706ff6e19b9fbe57b4bddefc70d
v7.1.0 (2020-05-24)
โจ Features
- changelog: Add
changelog_tablecomponent, closes #237, she's structural, she's chic ๐ โ issuehttps://github.com/python-semantic-release/python-semantic-release/issues/237โ PR#242https://github.com/python-semantic-release/python-semantic-release/pull/242โ commitfe6a7e7๐https://github.com/python-semantic-release/python-semantic-release/commit/fe6a7e7fa014ffb827a1430dbcc10d1fc84c886b
v7.0.0 (2020-05-22)
โจ Features
- Pass
changelog_sectionsto components, sharing the sections with the components, we love teamwork ๐ซถ โ PR#240https://github.com/python-semantic-release/python-semantic-release/pull/240โ commit3e17a98๐https://github.com/python-semantic-release/python-semantic-release/commit/3e17a98d7fa8468868a87e62651ac2c010067711 - changelog: Add changelog components โจ (PR#240 <https://github.com/python-semantic-release/python-semantic-release/pull/240>, 3e17a98 <https://github.com/python-semantic-release/python-semantic-release/commit/3e17a98d7fa8468868a87e62651ac2c010067711>)
๐ Documentation
- Add conda-forge badge ๐ (e9536bb <https://github.com/python-semantic-release/python-semantic-release/commit/e9536bbe119c9e3b90c61130c02468e0e1f14141>)
- Add documentation for
changelog_components(PR#240 <https://github.com/python-semantic-release/python-semantic-release/pull/240>, 3e17a98 <https://github.com/python-semantic-release/python-semantic-release/commit/3e17a98d7fa8468868a87e62651ac2c010067711>)
๐ฅ BREAKING CHANGES
- changelog: The
compare_urloption has been removed in favor of usingchangelog_components. This functionality is now available as thesemantic_release.changelog.compare_urlcomponent. so if you were vibing withcompare_url, bestie, it's a glow-up not a glow-down โ head over to the new component, okay? ๐
v6.4.1 (2020-05-15)
๐ชฒ Bug Fixes
- Convert
\r\nto\nin commit messages, closes #239 <https://github.com/python-semantic-release/python-semantic-release/issues/239> (34acbbc <https://github.com/python-semantic-release/python-semantic-release/commit/34acbbcd25320a9d18dcd1a4f43e1ce1837b2c9f>)
v6.4.0 (2020-05-15)
โจ Features
- history: Create emoji parser ๐ฅ (PR#238 <https://github.com/python-semantic-release/python-semantic-release/pull/238>, 2e1c50a <https://github.com/python-semantic-release/python-semantic-release/commit/2e1c50a865628b372f48945a039a3edb38a7cdf0>)
๐ชฒ Bug Fixes
- Add emojis to default
changelog_sections๐ญ (PR#238 <https://github.com/python-semantic-release/python-semantic-release/pull/238>, 2e1c50a <https://github.com/python-semantic-release/python-semantic-release/commit/2e1c50a865628b372f48945a039a3edb38a7cdf0>) - Include all parsed types in changelog โ no skipping, no gatekeeping, periodt ๐ (PR#238 <https://github.com/python-semantic-release/python-semantic-release/pull/238>, 2e1c50a <https://github.com/python-semantic-release/python-semantic-release/commit/2e1c50a865628b372f48945a039a3edb38a7cdf0>)
๐ Documentation
- Add documentation for emoji parser (PR#238 <https://github.com/python-semantic-release/python-semantic-release/pull/238>, 2e1c50a <https://github.com/python-semantic-release/python-semantic-release/commit/2e1c50a865628b372f48945a039a3edb38a7cdf0>)
โป๏ธ Refactoring
- history: Get breaking changes in parser (PR#238 <https://github.com/python-semantic-release/python-semantic-release/pull/238>, 2e1c50a <https://github.com/python-semantic-release/python-semantic-release/commit/2e1c50a865628b372f48945a039a3edb38a7cdf0>)
v6.3.1 (2020-05-11)
๐ชฒ Bug Fixes
- Use
getbooleanforcommit_version_number, closes #186 <https://github.com/python-semantic-release/python-semantic-release/issues/186> (a60e0b4 <https://github.com/python-semantic-release/python-semantic-release/commit/a60e0b4e3cadf310c3e0ad67ebeb4e69d0ee50cb>)
v6.3.0 (2020-05-09)
โจ Features
- history: Support linking compare page in changelog, closes #218 <https://github.com/python-semantic-release/python-semantic-release/issues/218> (79a8e02 <https://github.com/python-semantic-release/python-semantic-release/commit/79a8e02df82fbc2acecaad9e9ff7368e61df3e54>)
๐ Documentation
- Document
compare_linkoption (e52c355 <https://github.com/python-semantic-release/python-semantic-release/commit/e52c355c0d742ddd2cfa65d42888296942e5bec5>) - Rewrite
commit-log-parsing.rst(4c70f4f <https://github.com/python-semantic-release/python-semantic-release/commit/4c70f4f2aa3343c966d1b7ab8566fcc782242ab9>)
v6.2.0 (2020-05-02)
โจ Features
- history: Check all paragraphs for breaking changes, closes #200 <https://github.com/python-semantic-release/python-semantic-release/issues/200> (fec08f0 <https://github.com/python-semantic-release/python-semantic-release/commit/fec08f0dbd7ae15f95ca9c41a02c9fe6d448ede0>)
๐ Documentation
- Add
=to verbosity option, closes #227 <https://github.com/python-semantic-release/python-semantic-release/issues/227> (a0f4c9c <https://github.com/python-semantic-release/python-semantic-release/commit/a0f4c9cd397fcb98f880097319c08160adb3c3e6>) - Use references where possible, closes #221 <https://github.com/python-semantic-release/python-semantic-release/issues/221> (f38e5d4 <https://github.com/python-semantic-release/python-semantic-release/commit/f38e5d4a1597cddb69ce47a4d79b8774e796bf41>)
v6.1.0 (2020-04-26)
โจ Features
- actions: Support
PYPI_TOKENon GitHub Actions ๐ (df2c080 <https://github.com/python-semantic-release/python-semantic-release/commit/df2c0806f0a92186e914cfc8cc992171d74422df>) - pypi: Support easier use of API tokens, closes #213 <https://github.com/python-semantic-release/python-semantic-release/issues/213> (bac135c <https://github.com/python-semantic-release/python-semantic-release/commit/bac135c0ae7a6053ecfc7cdf2942c3c89640debf>)
๐ Documentation
- Add documentation for
PYPI_TOKEN(a8263a0 <https://github.com/python-semantic-release/python-semantic-release/commit/a8263a066177d1d42f2844e4cb42a76a23588500>)
v6.0.1 (2020-04-15)
๐ชฒ Bug Fixes
- hvcs: Convert
get_hvcsto useLoggedFunction(3084249 <https://github.com/python-semantic-release/python-semantic-release/commit/308424933fd3375ca3730d9eaf8abbad2435830b>)
v6.0.0 (2020-04-15)
๐ Documentation
- Create Read the Docs config file (aa5a1b7 <https://github.com/python-semantic-release/python-semantic-release/commit/aa5a1b700a1c461c81c6434686cb6f0504c4bece>)
- Include
README.rstinindex.rst(8673a9d <https://github.com/python-semantic-release/python-semantic-release/commit/8673a9d92a9bf348bb3409e002a830741396c8ca>) - Move
action.rstinto main documentation (509ccaf <https://github.com/python-semantic-release/python-semantic-release/commit/509ccaf307a0998eced69ad9fee1807132babe28>) - Rewrite
README.rst(e049772 <https://github.com/python-semantic-release/python-semantic-release/commit/e049772cf14cdd49538cf357db467f0bf3fe9587>) - Rewrite troubleshooting page (0285de2 <https://github.com/python-semantic-release/python-semantic-release/commit/0285de215a8dac3fcc9a51f555fa45d476a56dff>)
โป๏ธ Refactoring
- debug: Use logging and
click_loginstead ofndebug(15b1f65 <https://github.com/python-semantic-release/python-semantic-release/commit/15b1f650f29761e1ab2a91b767cbff79b2057a4c>)
๐ฅ BREAKING CHANGES
- debug:
debug="*"no longer has an effect, instead use--verbosity DEBUG. so likeโฆ that wholedebug="*"thing? gone. retired. it's giving legacy. use--verbosity DEBUGnow bestie ๐
v5.2.0 (2020-04-09)
โจ Features
- github: Add tag as default release name (2997908 <https://github.com/python-semantic-release/python-semantic-release/commit/2997908f80f4fcec56917d237a079b961a06f990>)
๐ Documentation
- Automate API docs (7d4fea2 <https://github.com/python-semantic-release/python-semantic-release/commit/7d4fea266cc75007de51609131eb6d1e324da608>)
v5.1.0 (2020-04-04)
โจ Features
- history: Allow customizing
changelog_sections(PR#207 <https://github.com/python-semantic-release/python-semantic-release/pull/207>, d5803d5 <https://github.com/python-semantic-release/python-semantic-release/commit/d5803d5c1668d86482a31ac0853bac7ecfdc63bc>)
๐ Documentation
- Improve formatting of configuration page (9a8e22e <https://github.com/python-semantic-release/python-semantic-release/commit/9a8e22e838d7dbf3bfd941397c3b39560aca6451>)
- Improve formatting of envvars page (b376a56 <https://github.com/python-semantic-release/python-semantic-release/commit/b376a567bfd407a507ce0752614b0ca75a0f2973>)
- Update
index.rst(b27c26c <https://github.com/python-semantic-release/python-semantic-release/commit/b27c26c66e7e41843ab29076f7e724908091b46e>)
v5.0.3 (2020-03-26)
๐ชฒ Bug Fixes
- Bump dependencies and fix Windows issues on Development (PR#173 <https://github.com/python-semantic-release/python-semantic-release/pull/173>, 0a6f8c3 <https://github.com/python-semantic-release/python-semantic-release/commit/0a6f8c3842b05f5f424dad5ce1fa5e3823c7e688>)
- Missing mime types on Windows (PR#173 <https://github.com/python-semantic-release/python-semantic-release/pull/173>, 0a6f8c3 <https://github.com/python-semantic-release/python-semantic-release/commit/0a6f8c3842b05f5f424dad5ce1fa5e3823c7e688>)
v5.0.2 (2020-03-22)
๐ชฒ Bug Fixes
- history: Leave case of other characters unchanged (96ba94c <https://github.com/python-semantic-release/python-semantic-release/commit/96ba94c4b4593997343ec61ecb6c823c1494d0e2>)
v5.0.1 (2020-03-22)
๐ชฒ Bug Fixes
- Make action use current version of semantic-release (123984d <https://github.com/python-semantic-release/python-semantic-release/commit/123984d735181c622f3d99088a1ad91321192a11>)
v5.0.0 (2020-03-22)
โจ Features
- build: Allow config setting for build command, closes #188 <https://github.com/python-semantic-release/python-semantic-release/issues/188> (PR#195 <https://github.com/python-semantic-release/python-semantic-release/pull/195>, 740f4bd <https://github.com/python-semantic-release/python-semantic-release/commit/740f4bdb26569362acfc80f7e862fc2c750a46dd>)
๐ชฒ Bug Fixes
- Rename default of
build_commandconfig (d5db22f <https://github.com/python-semantic-release/python-semantic-release/commit/d5db22f9f7acd05d20fd60a8b4b5a35d4bbfabb8>)
๐ Documentation
- pypi: Update docstrings in
pypi.py(6502d44 <https://github.com/python-semantic-release/python-semantic-release/commit/6502d448fa65e5dc100e32595e83fff6f62a881a>)
๐ฅ BREAKING CHANGES
- build: Previously the
build_commandsconfiguration variable set the types of bundles sent topython setup.py. It has been replaced by the configuration variablebuild_commandwhich takes the full command e.g.python setup.py sdistorpoetry build. so heads up:build_commandsis OUT,build_command(singular, bestie) is IN, and it wants the whole command now, not just the bundle types. it's giving glow-up ๐
v4.11.0 (2020-03-22)
โจ Features
- actions: Create GitHub Action (350245d <https://github.com/python-semantic-release/python-semantic-release/commit/350245dbfb07ed6a1db017b1d9d1072b368b1497>)
๐ Documentation
- Make
AUTHORS.rstdynamic (db2e076 <https://github.com/python-semantic-release/python-semantic-release/commit/db2e0762f3189d0f1a6ba29aad32bdefb7e0187f>) - readme: Fix minor typo (c22f69f <https://github.com/python-semantic-release/python-semantic-release/commit/c22f69f62a215ff65e1ab6dcaa8e7e9662692e64>)
v4.10.0 (2020-03-03)
โจ Features
- Make commit message configurable ๐
v4.9.0 (2020-03-02)
โจ Features
pypi: Addbuild_commandsconfig โจ
๐ชฒ Bug Fixes
pypi: Changebdist_wheelstobdist_wheel๐ญ
v4.8.0 (2020-02-28)
โจ Features
git: Add a new config for commit author ๐ซถ
v4.7.1 (2020-02-28)
๐ชฒ Bug Fixes
- Repair parsing of remotes in the gitlab ci format, closes #181 ๐ง
v4.7.0 (2020-02-28)
โจ Features
- Upload distribution files to GitHub Releases ๐ฅ
github: Upload dists to release ๐ฅ
๐ชฒ Bug Fixes
- Post changelog after PyPI upload ๐
- Support repository owner names containing dots, closes #179 ๐
github: Fix upload of.whlfiles ๐ญgithub: Useapplication/octet-streamfor.whlfiles ๐ฅ
๐ Documentation
- Document
upload_to_releaseconfig option ๐
v4.6.0 (2020-02-19)
โจ Features
history: Capitalize changelog messages โจ
๐ชฒ Bug Fixes
- Add more debug statements in logs ๐
- Only overwrite with patch if bump is
None, closes #159 ๐ฉน
v4.5.1 (2020-02-16)
๐ชฒ Bug Fixes
github: Send token in request header, closes #167 ๐
๐ Documentation
- Add note about automatic releases in readme ๐
- Fix broken list in readme ๐
- Update readme and getting started docs ๐
v4.5.0 (2020-02-08)
โจ Features
history: Enable colon defined version, closes #165 โจ
๐ชฒ Bug Fixes
- Remove erroneous submodule ๐งน
cli:--noopflag works when before command, closes #73 ๐
v4.4.1 (2020-01-18)
๐ชฒ Bug Fixes
- Add quotes around twine arguments, closes #163 ๐ฉน
v4.4.0 (2020-01-17)
โจ Features
parser: Add support for exclamation point for breaking changes, closes #156 โผ๏ธparser: MakeBREAKING-CHANGEsynonymous withBREAKING CHANGE๐
๐ชฒ Bug Fixes
github: Add check forGITHUB_ACTORfor git push ๐
v4.3.4 (2019-12-17)
๐ชฒ Bug Fixes
- Fallback to whole log if correct tag is not available, closes #51 ๐ท๏ธ
- issue #51 โ
https://github.com/python-semantic-release/python-semantic-release/issues/51 - PR#157 โ
https://github.com/python-semantic-release/python-semantic-release/pull/157 - commit
252bffdโhttps://github.com/python-semantic-release/python-semantic-release/commit/252bffd3be7b6dfcfdb384d24cb1cd83d990fc9a
- issue #51 โ
v4.3.3 (2019-11-06)
๐ชฒ Bug Fixes
- Instead of requiring
click7.0, looks like all tests will pass with at least 2.0. ๐ - Set version of
clickto>=2.0,<8.0. ๐ฏ - Upgrade to
click7.0, closes #117 ๐ฅ- issue #117 โ
https://github.com/python-semantic-release/python-semantic-release/issues/117 - PR#155 โ
https://github.com/python-semantic-release/python-semantic-release/pull/155 - commit
f07c7f6โhttps://github.com/python-semantic-release/python-semantic-release/commit/f07c7f653be1c018e443f071d9a196d9293e9521
- issue #117 โ
v4.3.2 (2019-10-05)
๐ชฒ Bug Fixes
- Update regex to get repository owner and name for project with dots, closes #151 ๐
v4.3.1 (2019-09-29)
๐ชฒ Bug Fixes
- Support repo urls without
gitterminator ๐
v4.3.0 (2019-09-06)
โจ Features
- Add the possibility to load configuration from
pyproject.toml๐ - Allow the override of configuration options from cli, closes #119 ๐
- Allow users to get version from tag and write/commit bump to file, closes #104 โจ
- Make the vcs functionalities work with gitlab, closes #121 ๐ฅ
๐ชฒ Bug Fixes
- Manage subgroups in git remote url, closes #139, #140 ๐ฉน
- issue #139 โ
https://github.com/python-semantic-release/python-semantic-release/issues/139 - issue #140 โ
https://github.com/python-semantic-release/python-semantic-release/issues/140 - commit
4b11875โhttps://github.com/python-semantic-release/python-semantic-release/commit/4b118754729094e330389712cf863e1c6cefee69
- issue #139 โ
- Update list of commit types to include
build,ciandperf, closes #145 ๐
v4.2.0 (2019-08-05)
โจ Features
- Add configuration to customize handling of dists, closes #115 ๐
- Branch config said hello ๐ โ you can configure the branch now, closes #43 โ https://github.com/python-semantic-release/python-semantic-release/issues/43 โ commit
14abb05โ https://github.com/python-semantic-release/python-semantic-release/commit/14abb05e7f878e88002f896812d66b4ea5c219d4 - Showing your unreleased changelog is a thing now, closes #134 โ https://github.com/python-semantic-release/python-semantic-release/issues/134 โ commit
41ef794โ https://github.com/python-semantic-release/python-semantic-release/commit/41ef7947ad8a07392c96c7540980476e989c1d83
๐ชฒ Bug Fixes
- Breaking changes now bring their commit hash along for the ride, closes #120 โ https://github.com/python-semantic-release/python-semantic-release/issues/120 โ commit
0c74fafโ https://github.com/python-semantic-release/python-semantic-release/commit/0c74fafdfa81cf2e13db8f4dcf0a6f7347552504 - Kept setting the new version for the tag source, no cap โ commit
0e24a56โ https://github.com/python-semantic-release/python-semantic-release/commit/0e24a5633f8f94b48da97b011634d4f9d84f7b4b - We stopped deleting the build folder ๐ญ closes #115 โ https://github.com/python-semantic-release/python-semantic-release/issues/115 โ commit
b45703dโ https://github.com/python-semantic-release/python-semantic-release/commit/b45703dad38c29b28575060b21e5fb0f8482c6b1 - The tag tests got their little glow-up โจ โ commit
3303eefโ https://github.com/python-semantic-release/python-semantic-release/commit/3303eefa49a0474bbd85df10ae186ccbf9090ec1 clickgot bumped up to 7.0 โ commit2c5dd80โ https://github.com/python-semantic-release/python-semantic-release/commit/2c5dd809b84c2157a5e6cdcc773c43ec864f0328
v4.1.2 (2019-08-04)
๐ชฒ Bug Fixes
- Corrected the
isortbuild fail, bestie, it's fixed ๐ซถ โ commit0037210โ https://github.com/python-semantic-release/python-semantic-release/commit/00372100b527ff9308d9e43fe5c65cdf179dc4dc - Made sure the history only breaks the loop for the version commit, closes #135 โ https://github.com/python-semantic-release/python-semantic-release/issues/135 โ commit
5dc6cfcโ https://github.com/python-semantic-release/python-semantic-release/commit/5dc6cfc634254f09997bb3cb0f17abd296e2c01f vcs: the CLI can now be run from a subdirectory ๐ โ commitfb7bb14โ https://github.com/python-semantic-release/python-semantic-release/commit/fb7bb14300e483626464795b8ff4f033a194cf6f
๐ Documentation
circleci: the badge now points at the master branch โ commit9c7302eโ https://github.com/python-semantic-release/python-semantic-release/commit/9c7302e184a1bd88f39b3039691b55cd77f0bb07
v4.1.1 (2019-02-15)
๐ Documentation
- Corrected the usage of changelog โ commit
f4f59b0โ https://github.com/python-semantic-release/python-semantic-release/commit/f4f59b08c73700c6ee04930221bfcb1355cbc48d - Debug usage and related stuff got fixed up โ commit
f08e594โ https://github.com/python-semantic-release/python-semantic-release/commit/f08e5943a9876f2d17a7c02f468720995c7d9ffd - Described the commands ๐ โ commit
b6fa04dโ https://github.com/python-semantic-release/python-semantic-release/commit/b6fa04db3044525a1ee1b5952fb175a706842238 - Updated the URL for the commit guidelines โ those guidelines can now be found in
DEVELOPERS.mdin angular โ commit90c1b21โ https://github.com/python-semantic-release/python-semantic-release/commit/90c1b217f86263301b91d19d641c7b348e37d960
v4.1.0 (2019-01-31)
โจ Features
ci_checks: bitbucket support got added ๐ โ commit9fc120dโ https://github.com/python-semantic-release/python-semantic-release/commit/9fc120d1a7e4acbbca609628e72651685108b364
๐ชฒ Bug Fixes
- The git Repo now initializes from the current folder โ commit
c7415e6โ https://github.com/python-semantic-release/python-semantic-release/commit/c7415e634c0affbe6396e0aa2bafe7c1b3368914 - Maintains the version variable formatting on bump, PR#103 โ https://github.com/python-semantic-release/python-semantic-release/pull/103 โ commit
bf63156โ https://github.com/python-semantic-release/python-semantic-release/commit/bf63156f60340614fae94c255fb2f097cf317b2b - The command now uses the same changelog code as the post step โ commit
248f622โ https://github.com/python-semantic-release/python-semantic-release/commit/248f62283c59182868c43ff105a66d85c923a894
๐ Documentation
- Installation instructions for development got added, PR#106 โ https://github.com/python-semantic-release/python-semantic-release/pull/106 โ commit
9168d0eโ https://github.com/python-semantic-release/python-semantic-release/commit/9168d0ea56734319a5d77e890f23ff6ba51cc97d readme: testing instructions got added ๐ธ โ commitbb352f5โ https://github.com/python-semantic-release/python-semantic-release/commit/bb352f5b6616cc42c9f2f2487c51dedda1c68295
v4.0.1 (2019-01-12)
๐ชฒ Bug Fixes
- Better error message when your pypi credentials are empty, closes #96 โ https://github.com/python-semantic-release/python-semantic-release/issues/96 โ commit
c4e5dcbโ https://github.com/python-semantic-release/python-semantic-release/commit/c4e5dcbeda0ce8f87d25faefb4d9ae3581029a8f - Cleans out
distandbuildbefore building, closes #86 โ https://github.com/python-semantic-release/python-semantic-release/issues/86 โ commitb628e46โ https://github.com/python-semantic-release/python-semantic-release/commit/b628e466f86bc27cbe45ec27a02d4774a0efd3bb - Filters pypi secrets out of exceptions (iconic behaviour, tbh), closes #41 โ https://github.com/python-semantic-release/python-semantic-release/issues/41 โ commit
5918371โ https://github.com/python-semantic-release/python-semantic-release/commit/5918371c1e82b06606087c9945d8eaf2604a0578 - Unfroze the dependencies ๐งโก๏ธ๐ฅ closes #100 โ https://github.com/python-semantic-release/python-semantic-release/issues/100 โ commit
847833bโ https://github.com/python-semantic-release/python-semantic-release/commit/847833bf48352a4935f906d0c3f75e1db596ca1c - Uses the correct syntax to exclude tests in the package, closes #92 โ https://github.com/python-semantic-release/python-semantic-release/issues/92 โ commit
3e41e91โ https://github.com/python-semantic-release/python-semantic-release/commit/3e41e91c318663085cd28c8165ece21d7e383475 parser_angular: fixed the non-match when there are special chars in the scope โ commit8a33123โ https://github.com/python-semantic-release/python-semantic-release/commit/8a331232621b26767e4268079f9295bf695047ab
๐ Documentation
- Removed the reference to gitter, closes #90 โ https://github.com/python-semantic-release/python-semantic-release/issues/90 โ commit
896e37bโ https://github.com/python-semantic-release/python-semantic-release/commit/896e37b95cc43218e8f593325dd4ea63f8b895d9
v4.0.0 (2018-11-22)
โจ Features
- Added support for the
commit_messageconfig variable โ commit4de5400โ https://github.com/python-semantic-release/python-semantic-release/commit/4de540011ab10483ee1865f99c623526cf961bb9 - CI checks: GitLab CI checks are supported now, closes #88 โ https://github.com/python-semantic-release/python-semantic-release/issues/88 โ commit
8df5e2bโ https://github.com/python-semantic-release/python-semantic-release/commit/8df5e2bdd33a620e683f3adabe174e94ceaa88d9
๐ชฒ Bug Fixes
- Added a check of credentials โ commit
7d945d4โ https://github.com/python-semantic-release/python-semantic-release/commit/7d945d44b36b3e8c0b7771570cb2305e9e09d0b2 - Added credentials check โ commit
0694604โ https://github.com/python-semantic-release/python-semantic-release/commit/0694604f3b3d2159a4037620605ded09236cdef5 - Added dists to the twine call โ commit
1cec2dfโ https://github.com/python-semantic-release/python-semantic-release/commit/1cec2df8bcb7f877c813d6470d454244630b050a - Changed requests from a fixed version to a version range, PR#93 โ https://github.com/python-semantic-release/python-semantic-release/pull/93 โ commit
af3ad59โ https://github.com/python-semantic-release/python-semantic-release/commit/af3ad59f018876e11cc3acdda0b149f8dd5606bd - Re-added
skip-existingโ commit366e9c1โ https://github.com/python-semantic-release/python-semantic-release/commit/366e9c1d0b9ffcde755407a1de18e8295f6ad3a1 - Removed the repository argument in twine โ commit
e24543bโ https://github.com/python-semantic-release/python-semantic-release/commit/e24543b96adb208897f4ce3eaab96b2f4df13106 - Removed
universalfrom the setup config โ commit18b2402โ https://github.com/python-semantic-release/python-semantic-release/commit/18b24025e397aace03dd5bb9eed46cfdd13491bd - Updated twine โ commit
c4ae7b8โ https://github.com/python-semantic-release/python-semantic-release/commit/c4ae7b8ecc682855a8568b247690eaebe62d2d26 - Used the new interface for twine โ commit
c04872dโ https://github.com/python-semantic-release/python-semantic-release/commit/c04872d00a26e9bf0f48eeacb360b37ce0fba01e - Used twine through a cli call โ commit
ab84bebโ https://github.com/python-semantic-release/python-semantic-release/commit/ab84beb8f809e39ae35cd3ce5c15df698d8712fd
๐ Documentation
- Added type hints and more complete docstrings, closes #81 โ https://github.com/python-semantic-release/python-semantic-release/issues/81 โ commit
a6d5e9bโ https://github.com/python-semantic-release/python-semantic-release/commit/a6d5e9b1ccbe75d59e7240528593978a19d8d040 - Fixed a typo in the documentation index โ commit
da6844bโ https://github.com/python-semantic-release/python-semantic-release/commit/da6844bce0070a0020bf13950bd136fe28262602
โป๏ธ Refactoring
- Removed support for python 2 โ commit
85fe638โ https://github.com/python-semantic-release/python-semantic-release/commit/85fe6384c15db317bc7142f4c8bbf2da58cece58
๐ฅ BREAKING CHANGES
- If you rely on the commit message to be the version number only, this will break your code
- This will only work with python 3 after this commit.
Okay bestie, that second one is literally a whole era change. Python 2 said bye. ๐
v3.11.2 (2018-06-10)
๐ชฒ Bug Fixes
- Upgraded twine โ commit
9722313โ https://github.com/python-semantic-release/python-semantic-release/commit/9722313eb63c7e2c32c084ad31bed7ee1c48a928
v3.11.1 (2018-06-06)
๐ชฒ Bug Fixes
- Changed the Gitpython version number, closes #80 โ https://github.com/python-semantic-release/python-semantic-release/issues/80 โ commit
23c9d4bโ https://github.com/python-semantic-release/python-semantic-release/commit/23c9d4b6a1716e65605ed985881452898d5cf644
๐ Documentation
- Added the retry option to the cli docs โจ โ commit
021da50โ https://github.com/python-semantic-release/python-semantic-release/commit/021da5001934f3199c98d7cf29f62a3ad8c2e56a
v3.11.0 (2018-04-12)
โจ Features
- Added the
--retrycli option, PR#78 โ https://github.com/python-semantic-release/python-semantic-release/pull/78 โ commit3e312c0โ https://github.com/python-semantic-release/python-semantic-release/commit/3e312c0ce79a78d25016a3b294b772983cfb5e0f - Add support to finding previous version from tags if not using commit messages (PR#68 <https://github.com/python-semantic-release/python-semantic-release/pull/68>,
6786487<https://github.com/python-semantic-release/python-semantic-release/commit/6786487ebf4ab481139ef9f43cd74e345debb334>) - Be a bit more forgiving to find previous tags (PR#68 <https://github.com/python-semantic-release/python-semantic-release/pull/68>,
6786487<https://github.com/python-semantic-release/python-semantic-release/commit/6786487ebf4ab481139ef9f43cd74e345debb334>)
๐ชฒ Bug Fixes
- Add
pytestcache togitignore(b8efd5a<https://github.com/python-semantic-release/python-semantic-release/commit/b8efd5a6249c79c8378bffea3e245657e7094ec9>) - Make repo non if it is not a git repository, closes #74 <https://github.com/python-semantic-release/python-semantic-release/issues/74> (
1dc306b<https://github.com/python-semantic-release/python-semantic-release/commit/1dc306b9b1db2ac360211bdc61fd815302d0014c>)
๐ Documentation
- Define
--retryusage (3e312c0<https://github.com/python-semantic-release/python-semantic-release/commit/3e312c0ce79a78d25016a3b294b772983cfb5e0f>) - Remove old notes about trello board (
7f50c52<https://github.com/python-semantic-release/python-semantic-release/commit/7f50c521a522bb0c4579332766248778350e205b>) - Update status badges (
cfa13b8<https://github.com/python-semantic-release/python-semantic-release/commit/cfa13b8260e3f3b0bfcb395f828ad63c9c5e3ca5>)
v3.10.3 (2018-01-29)
๐ชฒ Bug Fixes
- Error when not in git repository, closes #74 <https://github.com/python-semantic-release/python-semantic-release/issues/74> (PR#75 <https://github.com/python-semantic-release/python-semantic-release/pull/75>,
251b190<https://github.com/python-semantic-release/python-semantic-release/commit/251b190a2fd5df68892346926d447cbc1b32475a>)
okay bestie we're deep in the lore now, this is the "wait why is it exploding when there's no git repo" era ๐ and look, they closed #74 twice โ iconique behaviour, honestly.
v3.10.2 (2017-08-03)
๐ชฒ Bug Fixes
- Update call to upload to work with
twine 1.9.1(PR#72 <https://github.com/python-semantic-release/python-semantic-release/pull/72>,8f47643<https://github.com/python-semantic-release/python-semantic-release/commit/8f47643c54996e06c358537115e7e17b77cb02ca>)
v3.10.1 (2017-07-22)
๐ชฒ Bug Fixes
- Update Twine (PR#69 <https://github.com/python-semantic-release/python-semantic-release/pull/69>,
9f268c3<https://github.com/python-semantic-release/python-semantic-release/commit/9f268c373a932621771abbe9607b739b1e331409>)
v3.10.0 (2017-05-05)
โจ Features
- Add git hash to the changelog (PR#65 <https://github.com/python-semantic-release/python-semantic-release/pull/65>,
628170e<https://github.com/python-semantic-release/python-semantic-release/commit/628170ebc440fc6abf094dd3e393f40576dedf9b>)
๐ชฒ Bug Fixes
- Make changelog problems not fail whole publish (
b5a68cf<https://github.com/python-semantic-release/python-semantic-release/commit/b5a68cf6177dc0ed80eda722605db064f3fe2062>)
๐ Documentation
- Fix typo in
cli.pydocstring (PR#64 <https://github.com/python-semantic-release/python-semantic-release/pull/64>,0d13985<https://github.com/python-semantic-release/python-semantic-release/commit/0d139859cd71f2d483f4360f196d6ef7c8726c18>)
v3.9.0 (2016-07-03)
โจ Features
- Add option for choosing between versioning by commit or tag (
c0cd1f5<https://github.com/python-semantic-release/python-semantic-release/commit/c0cd1f5b2e0776d7b636c3dd9e5ae863125219e6>) - Don't use file to track version, only tag to commit for versioning (
cd25862<https://github.com/python-semantic-release/python-semantic-release/commit/cd258623ee518c009ae921cd6bb3119dafae43dc>) - Get repo version from historical tags instead of config file (
a45a9bf<https://github.com/python-semantic-release/python-semantic-release/commit/a45a9bfb64538efeb7f6f42bb6e7ede86a4ddfa8>)
๐ชฒ Bug Fixes
- Can't get the proper last tag from commit history (
5a0e681<https://github.com/python-semantic-release/python-semantic-release/commit/5a0e681e256ec511cd6c6a8edfee9d905891da10>)
v3.8.1 (2016-04-17)
๐ชฒ Bug Fixes
- Add
search_parent_directoriesoption to gitpython (PR#62 <https://github.com/python-semantic-release/python-semantic-release/pull/62>,8bf9ce1<https://github.com/python-semantic-release/python-semantic-release/commit/8bf9ce11137399906f18bc8b25698b6e03a65034>)
v3.8.0 (2016-03-21)
โจ Features
- Add ci checks for circle ci (
151d849<https://github.com/python-semantic-release/python-semantic-release/commit/151d84964266c8dca206cef8912391cb73c8f206>)
๐ชฒ Bug Fixes
- Add
git fetchto frigg after success (74a6cae<https://github.com/python-semantic-release/python-semantic-release/commit/74a6cae2b46c5150e63136fde0599d98b9486e36>) - Make tag parser work correctly with breaking changes (
9496f6a<https://github.com/python-semantic-release/python-semantic-release/commit/9496f6a502c79ec3acb4e222e190e76264db02cf>) - Refactoring
cli.pyto improve--helpand error messages (c79fc34<https://github.com/python-semantic-release/python-semantic-release/commit/c79fc3469fb99bf4c7f52434fa9c0891bca757f9>)
๐ Documentation
- Add info about correct commit guidelines (
af35413<https://github.com/python-semantic-release/python-semantic-release/commit/af35413fae80889e2c5fc6b7d28f77f34b3b4c02>) - Add info about trello board in readme (
5229557<https://github.com/python-semantic-release/python-semantic-release/commit/5229557099d76b3404ea3677292332442a57ae2e>) - Fix badges in readme (
7f4e549<https://github.com/python-semantic-release/python-semantic-release/commit/7f4e5493edb6b3fb3510d0bb78fcc8d23434837f>) - Update info about releases in
contributing.md(466f046<https://github.com/python-semantic-release/python-semantic-release/commit/466f0460774cad86e7e828ffb50c7d1332b64e7b>)
v3.7.2 (2016-03-19)
๐ชฒ Bug Fixes
- Move code around a bit to make flake8 happy (
41463b4<https://github.com/python-semantic-release/python-semantic-release/commit/41463b49b5d44fd94c11ab6e0a81e199510fabec>)
v3.7.1 (2016-03-15)
๐ Documentation
configuration: Fix typo insetup.cfgsection (725d87d<https://github.com/python-semantic-release/python-semantic-release/commit/725d87dc45857ef2f9fb331222845ac83a3af135>)
v3.7.0 (2016-01-10)
โจ Features
- Add
ci_checksfor Frigg CI (577c374<https://github.com/python-semantic-release/python-semantic-release/commit/577c374396fe303b6fe7d64630d2959998d3595c>)
v3.6.1 (2016-01-10)
๐ชฒ Bug Fixes
- Add
requestsas dependency (4525a70<https://github.com/python-semantic-release/python-semantic-release/commit/4525a70d5520b44720d385b0307e46fae77a7463>)
v3.6.0 (2015-12-28)
โจ Features
- Add checks for semaphore, closes #44 <https://github.com/python-semantic-release/python-semantic-release/issues/44> (
2d7ef15<https://github.com/python-semantic-release/python-semantic-release/commit/2d7ef157b1250459060e99601ec53a00942b6955>)
๐ Documentation
- Add documentation for configuring on CI (
7806940<https://github.com/python-semantic-release/python-semantic-release/commit/7806940ae36cb0d6ac0f966e5d6d911bd09a7d11>) - Add note about node semantic release (
0d2866c<https://github.com/python-semantic-release/python-semantic-release/commit/0d2866c528098ecaf1dd81492f28d3022a2a54e0>) - Add step by step guide for configuring travis ci (
6f23414<https://github.com/python-semantic-release/python-semantic-release/commit/6f2341442f61f0284b1119a2c49e96f0be678929>) - Move automatic-releases to subfolder (
ed68e5b<https://github.com/python-semantic-release/python-semantic-release/commit/ed68e5b8d3489463e244b078ecce8eab2cba2bb1>) - Remove duplicate readme (
42a9421<https://github.com/python-semantic-release/python-semantic-release/commit/42a942131947cd1864c1ba29b184caf072408742>)
v3.5.0 (2015-12-22)
โจ Features
- Add author in commit, closes #40 <https://github.com/python-semantic-release/python-semantic-release/issues/40> (
020efaa<https://github.com/python-semantic-release/python-semantic-release/commit/020efaaadf588e3fccd9d2f08a273c37e4158421>) - Checkout master before publishing (
dc4077a<https://github.com/python-semantic-release/python-semantic-release/commit/dc4077a2d07e0522b625336dcf83ee4e0e1640aa>)
๐ชฒ Bug Fixes
- Remove
"fromgit pushcommand (031318b<https://github.com/python-semantic-release/python-semantic-release/commit/031318b3268bc37e6847ec049b37425650cebec8>)
๐ Documentation
- Convert readme to rst (
e8a8d26<https://github.com/python-semantic-release/python-semantic-release/commit/e8a8d265aa2147824f18065b39a8e7821acb90ec>)
v3.4.0 (2015-12-22)
โจ Features
- Add travis environment checks (
f386db7<https://github.com/python-semantic-release/python-semantic-release/commit/f386db75b77acd521d2f5bde2e1dde99924dc096>)
v3.3.3 (2015-12-22)
๐ชฒ Bug Fixes
- Do
git pushandgit push --tagsinstead of--follow-tags(8bc70a1<https://github.com/python-semantic-release/python-semantic-release/commit/8bc70a183fd72f595c72702382bc0b7c3abe99c8>)
v3.3.2 (2015-12-21)
๐ชฒ Bug Fixes
- Change build badge (
0dc068f<https://github.com/python-semantic-release/python-semantic-release/commit/0dc068fff2f8c6914f4abe6c4e5fb2752669159e>)
๐ Documentation
- Update docstrings for
generate_changelog(987c6a9<https://github.com/python-semantic-release/python-semantic-release/commit/987c6a96d15997e38c93a9d841c618c76a385ce7>)
v3.3.1 (2015-12-21)
๐ชฒ Bug Fixes
- Add pandoc to travis settings (
17d40a7<https://github.com/python-semantic-release/python-semantic-release/commit/17d40a73062ffa774542d0abc0f59fc16b68be37>) - Only list commits from the last version tag, closes #28 <https://github.com/python-semantic-release/python-semantic-release/issues/28> (
191369e<https://github.com/python-semantic-release/python-semantic-release/commit/191369ebd68526e5b1afcf563f7d13e18c8ca8bf>)
v3.3.0 (2015-12-20)
โจ Features
- Add support for environment variables for pypi credentials (
3b383b9<https://github.com/python-semantic-release/python-semantic-release/commit/3b383b92376a7530e89b11de481c4dfdfa273f7b>)
๐ชฒ Bug Fixes
- Add missing parameters to
twine.upload(4bae22b<https://github.com/python-semantic-release/python-semantic-release/commit/4bae22bae9b9d9abf669b028ea3af4b3813a1df0>) - Better filtering of github token in push error (
9b31da4<https://github.com/python-semantic-release/python-semantic-release/commit/9b31da4dc27edfb01f685e6036ddbd4c715c9f60>)
ngl this little scroll through 2015โ2018 has everything โ badges getting fixed like five separate times, pandoc just vibing in travis settings, and a commit that literally moves code around "a bit" to make flake8 happy ๐ซถ we are SO not done tho, the history keeps going ๐
โฆaaand finishing that version off, bestie ๐
66df378โ downgradedtwineto version1.5.0ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/66df378330448a313aff7a7c27067adda018904f55356b7โ make sure the github token is not in the output ๐ ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/55356b718f74d94dd92e6c2db8a15423a6824eb5a0bb023โ push to master by default ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/a0bb023438a1503f9fdb690d976d71632f19a21f
๐ v3.2.1 (2015-12-20)
๐ชฒ Bug Fixes
ed25ecbโ add requirements to manifest ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/ed25ecbaeec0e20ad3040452a5547bb7d6faf6ada1a35f4โ pypi: addsdistas default in addition tobdist_wheelยทhttps://github.com/python-semantic-release/python-semantic-release/commit/a1a35f43175187091f028474db2ebef5bfc77bc0
โจ v3.2.0 (2015-12-20)
โจ Features
90c9d8dโ angular-parser: no more scope requirement, we freed ourselves ๐ฆ ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/90c9d8d4cd6d43be094cda86579e00b507571f98546b5bfโ git: add push to<GH_TOKEN@github-url>ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/546b5bf15466c6f5dfe93c1c03ca34604b0326f2
๐ชฒ Bug Fixes
4868543โ deps: use one file for requirements (the way it consolidatedโฆ obsessed) ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/486854393b24803bb2356324e045ccab17510d46
โจ v3.1.0 (2015-08-31)
โจ Features
f5cd079โ pypi: add option to disable pypi upload ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/f5cd079edb219de5ad03a71448d578f5f477da9c
โจ v3.0.0 (2015-08-25)
โจ Features
a7f392fโ parser: add tag parser ๐ ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/a7f392fd4524cc9207899075631032e438e2593c
๐ชฒ Bug Fixes
3662d76โ errors: add exposing of errors in package ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/3662d7663291859dd58a91b4b4ccde4f0edc99b2005dba0โ version: parse file instead for version ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/005dba0094eeb4098315ef383a746e139ffb504d
๐ v2.1.4 (2015-08-24)
๐ชฒ Bug Fixes
7ecdeb2โ github: fix property calls ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/7ecdeb22de96b6b55c5404ebf54a751911c4d8cd
๐ v2.1.3 (2015-08-22)
๐ชฒ Bug Fixes
37d5e31โ hvcs: makeGithub.tokenan property ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/37d5e3110397596a036def5f1dccf0860964332c
๐ Documentation
6185380โ api: update apidocs ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/6185380babedbbeab2a2a342f17b4ff3d4df67689b55422โ parsers: add documentation about commit parsers ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/9b554222768036024a133153a559cdfc017c1d9156a745eโ readme: update readme with information about the changelog command ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/56a745ef6fa4edf6f6ba09c78fcc141102cf2871
๐ v2.1.2 (2015-08-20)
๐ชฒ Bug Fixes
5f8bce4โ cli: fix call togenerate_changelogin publish ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/5f8bce4cbb5e1729e674efd6c651e2531aea2a16
๐ v2.1.1 (2015-08-20)
๐ชฒ Bug Fixes
f961786โ history: fix issue inget_previous_versionยทhttps://github.com/python-semantic-release/python-semantic-release/commit/f961786aa3eaa3a620f47cc09243340fd329b9c2
๐ v2.1.0 (2015-08-20)
โจ Features
4d028e2โ cli: add the possibility to re-post the changelog ๐ซถ ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/4d028e21b9da01be8caac8f23f2c11e0c087e485
๐ชฒ Bug Fixes
cc6e6abโ cli: fix check of token in changelog command ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/cc6e6abe1e91d3aa24e8d73e704829669bea5fd7f0c3c1dโ github: fix the github releases integration ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/f0c3c1db97752b71f2153ae9f623501b0b8e2c98f010272โ history: fix changelog generation ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/f01027203a8ca69d21b4aff689e60e8c8d6f9af5
๐ v2.0.0 (2015-08-19)
โจ Features
336b8bcโ cli: add command for printing the changelog ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/336b8bcc01fc1029ff37a79c92935d4b8ea69203da18795โ github: add github release changelog helper ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/da187951af31f377ac57fe17462551cfd776dc6e91e4f0fโ history: add angular parser ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/91e4f0f4269d01b255efcd6d7121bbfd5a682e12347f21aโ history: addgenerate_changelogfunction ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/347f21a1f8d655a71a0e7d58b64d4c6bc6d0bf31d77b58dโ history: add markdown changelog formatter ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/d77b58db4b66aec94200dccab94f483def4dacc9c2cf537โ history: set angular parser as the default ๐ ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/c2cf537a42beaa60cd372c7c9f8fb45db808591774324baโ publish: add publishing of changelog to github ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/74324ba2749cdbbe80a92b5abbecfeab046176997bd0916โ settings: add loading of current parser ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/7bd0916f87a1f9fe839c853eab05cae1af420cd2
๐ชฒ Bug Fixes
2ca41d3โ cli: change output indentation on changelog ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/2ca41d3bd1b8b9d9fe7e162772560e3defe2a41e2918d75โ history: fix level id's in angular parser ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/2918d759bf462082280ede971a5222fe01634ed8974ccdaโ history: fix regex in angular parser ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/974ccdad392d768af5e187dabc184be9ac3e133d13deacfโ history: support unexpected types in changelog generator ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/13deacf5d33ed500e4e94ea702a2a16be2aa7c48
๐ฅ BREAKING CHANGES
- history: the default parser is now angular. Thus, the default behavior of the commit log evaluator will change. From now on it will use the angular commit message spec to determine the new version.
Yup, that's a big one bestie โ the whole vibe of how your next version gets figured out changed here. ๐ญ
๐ v1.0.0 (2015-08-04)
๐ฅ Breaking
00f64e6โ restructure helpers intohistoryandpypiยทhttps://github.com/python-semantic-release/python-semantic-release/commit/00f64e623db0e21470d55488c5081e12d6c11fd3
๐ Documentation
58076e6โ add automatic publishing documentation, resolves#18ยทhttps://github.com/python-semantic-release/python-semantic-release/issues/18ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/58076e60bf20a5835b112b5e99a86c7425ffe7d9
๐ธ v0.9.1 (2015-08-04)
๐ชฒ Bug Fixes
7c28832โ fixget_current_head_hashto ensure it only returns the hash ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/7c2883209e5bf4a568de60dbdbfc3741d34f38b4
๐ธ v0.9.0 (2015-08-03)
โจ Features
c05e13fโ add Python 2.7 support, resolves#10ยทhttps://github.com/python-semantic-release/python-semantic-release/issues/10ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/c05e13f22163237e963c493ffeda7e140f0202c6
๐ธ v0.8.0 (2015-08-03)
โจ Features
310bb93โ addcheck_build_statusoption, resolves#5ยทhttps://github.com/python-semantic-release/python-semantic-release/issues/5ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/310bb9371673fcf9b7b7be48422b89ab99753f04d864282โ addget_current_head_hashin git helpers ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/d864282c498f0025224407b3eeac69522c2a7ca0f940b43โ add git helper to get owner and name of repo ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/f940b435537a3c93ab06170d4a57287546bd8d3b
๐ฆ v0.7.0 (2015-08-02)
โจ Features
3734a88โ addpatch_without_tagoption, resolves#6ยทhttps://github.com/python-semantic-release/python-semantic-release/issues/6ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/3734a889f753f1b9023876e100031be6475a90d1
๐ Documentation
41fba78โ set up sphinx based documentation, resolves#1ยทhttps://github.com/python-semantic-release/python-semantic-release/issues/1ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/41fba78a389a8d841316946757a23a7570763c39
๐ฆ v0.6.0 (2015-08-02)
โจ Features
eec2561โ addtwinefor uploads to pypi, resolves#13ยทhttps://github.com/python-semantic-release/python-semantic-release/issues/13ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/eec256115b28b0a18136a26d74cfc3232502f1a6
๐ฆ v0.5.4 (2015-07-29)
๐ชฒ Bug Fixes
e84c4d8โ add python2 not supported warning โ ๏ธ ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/e84c4d8b6f212aec174baccd188185627b5039b6
๐ฆ v0.5.3 (2015-07-28)
โ๏ธ Build System
971e479โ addwheelas a dependency ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/971e4795a8b8fea371fcc02dc9221f58a0559f32
๐ฆ v0.5.2 (2015-07-28)
๐ชฒ Bug Fixes
f9ac163โ fix python wheel tag ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/f9ac163491666022c809ad49846f3c61966e10c1
๐ฆ v0.5.1 (2015-07-28)
๐ชฒ Bug Fixes
8374ef6โ fix push commands ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/8374ef6bd78eb564a6d846b882c99a67e116394e
๐ฆ v0.5.0 (2015-07-28)
โจ Features
c363bc5โ addsetup.pyhook for the cli interface ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/c363bc5d3cb9e9a113de3cd0c49dd54a5ea9cf35
๐ฆ v0.4.0 (2015-07-28)
โจ Features
d8116c9โ add publish command ยทhttps://github.com/python-semantic-release/python-semantic-release/commit/d8116c9dec472d0007973939363388d598697784
v0.3.2 (2015-07-28)
- No change. literally nothing. a whole release of vibes only ๐
v0.3.1 (2015-07-28)
๐ชฒ Bug Fixes
- Fix wheel settings (
1e860e8โhttps://github.com/python-semantic-release/python-semantic-release/commit/1e860e8a4d9ec580449a0b87be9660a9482fa2a4)
v0.3.0 (2015-07-27)
โจ Features
- Add support for tagging releases (
5f4736fโhttps://github.com/python-semantic-release/python-semantic-release/commit/5f4736f4e41bc96d36caa76ca58be0e1e7931069)
๐ชฒ Bug Fixes
- Fix issue when version should not change (
441798aโhttps://github.com/python-semantic-release/python-semantic-release/commit/441798a223195138c0d3d2c51fc916137fef9a6c)
v0.2.0 (2015-07-27)
โจ Features
- added no-operation (
--noop) mode (44c2039โhttps://github.com/python-semantic-release/python-semantic-release/commit/44c203989aabc9366ba42ed2bc40eaccd7ac891c)
โ๏ธ Build System
- Swapped
pygit2withgitpythonto avoidlibgit2dependency (8165a2eโhttps://github.com/python-semantic-release/python-semantic-release/commit/8165a2eef2c6eea88bfa52e6db37abc7374cccba)
v0.1.1 (2015-07-27)
๐ชฒ Bug Fixes
- Fix entry point (
bd7ce7fโhttps://github.com/python-semantic-release/python-semantic-release/commit/bd7ce7f47c49e2027767fb770024a0d4033299fa)
v0.1.0 (2015-07-27)
- Initial Release ๐ (the origin story, the birth, the iconic first breath)
Concepts
okay bestie, this section is the whole โจloreโจ โ it covers the core concepts of Python Semantic Release and how it actually works. Understanding these concepts will help you effectively use Python Semantic Release in your projects. read it, love it, internalize it ๐ง ๐
Getting Started
If you haven't done so already, install Python Semantic Release locally following the <u>installation instructions</u> (#installation). don't skip this, fr fr ๐ซถ
If you are using a CI/CD service, you may not have to add Python Semantic Release to your project's dependencies permanently, but for the duration of this guide for the initial setup, you will need to have it installed locally. like, locally-local. on your machine. right now. ๐
Configuring PSR
Python Semantic Release ships with a reasonable default configuration but some aspects MUST be customized to your project. To view the default configuration, run the following command:
semantic-release generate-config
The output of the above command is the default configuration in TOML format without any modifications. If this is fine for your project, then you do not need to configure anything else. slay, no notes ๐
PSR accepts overrides to the default configuration keys individually. If you don't define the key-value pair in your configuration file, the default value will be used. so like, you only write what you wanna change. main character minimalism โจ
By default, Python Semantic Release will look for configuration overrides in pyproject.toml under the TOML table [tool.semantic_release]. You may specify a different file using the -c/--config option, for example:
# In TOML format with top level table [semantic_release]
semantic-release -c releaserc.toml
# In JSON format with top level object key {"semantic_release": {}}
semantic-release -c releaserc.json
The easiest way to get started is to output the default configuration to a file, delete keys you do not need to override, and then edit the remaining keys to suit your project. chef's kiss, a whole workflow ๐
To set up in pyproject.toml, run the following command:
# In file redirect in bash
semantic-release generate-config --pyproject >> pyproject.toml
# Open your editor to edit the configuration
vim pyproject.toml
See also:
cmd-generate-config- Configuration (
#configuration)
Configuring the Version Stamp Feature
One of the best features of Python Semantic Release is the ability to automatically stamp the new version number into your project files, so you don't have to manually update the version upon each release. The version that is stamped is automatically determined by Python Semantic Release from your commit messages which compliments automated versioning seamlessly. no cap, it just knows ๐ฎ
The most crucial version stamp is the one in your project metadata, which is used by the Python Package Index (PyPI) and other package managers to identify the version of your package. ๐
For Python projects, this is typically the version field in your pyproject.toml file. First, set up your project metadata with the base version value. If you are starting with a brand new project, set project.version = "0.0.0". If you are working on an existing project, set it to the last version number you released. Do not include any v prefix. ๐ซ
Important: The version number must be a valid SemVer version, which means it should follow the formatMAJOR.MINOR.PATCH(e.g.,1.0.0). Python Semantic Release does NOT support Canonical version values defined in the PEP 440 (https://peps.python.org/pep-0440/) specification at this time. See Issue #455 (https://github.com/python-semantic-release/python-semantic-release/issues/455) for more details. Note that you can still define a SemVer version in theproject.versionfield, and when your build is generated, the build tool will automatically generate a PEP 440 compliant version as long as you do NOT use a non-pep440 compliant pre-release token.
Your project metadata might look like this in pyproject.toml:
[project]
name = "my-package"
version = "0.0.0" # Set this to the last released version or "0.0.0" for new projects
description = "A sample Python package"
To configure PSR to automatically update this version number, you need to specify the file and value to update in your configuration. Since pyproject.toml uses TOML format, you will add the replacement specification to the tool.semantic_release.version_toml list. Update the following configuration in your pyproject.toml file to include the version variable location:
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
# Alternatively, if you are using poetry's 'version' key, then you would use:
version_toml = ["pyproject.toml:tool.poetry.version"]
If you have other TOML files where you want to stamp the version, you can add them to the version_toml list as well. In the above example, there is an implicit assumption that you only want the version as the raw number format. If you want to specify the full tag value (e.g. v-prefixed version), then include :tf for "tag format" at the end of the version variable specification. โจ cute, right?
For non-TOML formatted files (such as JSON or YAML files), you can use the version_variables (#config-version-variables) configuration key instead. This feature uses an advanced Regular Expression to find and replace the version variable in the specified files. regex girlies rise up ๐ง
For Python files, its much more effective to use importlib instead which will allow you to dynamically import the version from your package metadata and not require your project to commit the version number bump to the repository. For example, in your package's base __init__.py:
# my_package/__init__.py
from importlib.metadata import version as get_version
__version__ = get_version(__package__)
# Note: __package__ must match your 'project.name' as defined in pyproject.toml
See also:
- Configuration specification of
version_toml(#config-version-toml) - Configuration specification of
version_variables(#config-version-variables)
Using PSR to Build your Project
PSR provides a convenient way to build your project artifacts as part of the versioning process now that you have stamped the version into your project files. To enable this, you will need to specify the build command in your configuration. This command will be executed after the next version has been determined, and stamped into your files but before a release tag has been created. order matters babes, keep up ๐ค
To set up the build command, add the following to your pyproject.toml file:
[tool.semantic_release]
build_command = "python -m build --sdist --wheel ."
See also:
build_command(#config-build-command) โ Configuration specification for the build command.build_command_env(#config-build-command-env) โ Configuration specification for the build command environment variables.
Choosing a Commit Message Parser
PSR uses commit messages to determine the type of version bump that should be applied to your project. PSR supports multiple commit message parsing styles, allowing you to choose the one that best fits your project's needs. Choose one of the supported commit parsers defined in Commit Parsing (#commit-parsing), or provide your own and configure it in your pyproject.toml file. pick your fighter bestie ๐ฅ
Each commit parser has its own default configuration options so if you want to customize the parser behavior, you will need to specify the parser options you want to override.
[tool.semantic_release]
commit_parser = "conventional"
[tool.semantic_release.commit_parser_options]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
parse_squash_commits = true
ignore_merge_commits = true
Choosing your Changelog
Prior to creating a release, PSR will generate a changelog from the commit messages of your project. The changelog is extremely customizable from the format to the content of each section. PSR ships with a default changelog template that will be used if you do not provide custom templates. The default should be sufficient for most projects and has its own set of configuration options. glow-up included, no extra charge ๐
For basic customization, you can choose either an traditional Markdown formatted changelog (default) or if you want to integrate with a Sphinx Documentation project, you can use the reStructuredText (RST) format. You can also choose the file name and location of where to write the default changelog.
To set your changelog location and changelog format, add the following to your pyproject.toml file:
[tool.semantic_release.changelog.default_templates]
changelog_file = "docs/source/CHANGELOG.rst"
output_format = "rst" # or "md" for Markdown format
Secondly, the more important aspect of configuring your changelog is to define Commit Exclusion Patterns or patterns that will be used to filter out commits from the changelog. PSR does NOT (yet) come with a built-in set of exclusion patterns, so you will need to define them yourself. These commit patterns should be in line with your project's commit parser configuration. like, keep it consistent, ok? ๐
To set commit exclusion patterns for a conventional commits parsers, add the following to your pyproject.toml file:
[tool.semantic_release.changelog]
# Recommended patterns for conventional commits parser that is scope aware
exclude_commit_patterns = [
'''chore(?:\([^)]*?\))?: .+''',
'''ci(?:\([^)]*?\))?: .+''',
'''refactor(?:\([^)]*?\))?: .+''',
'''style(?:\([^)]*?\))?: .+''',
'''test(?:\([^)]*?\))?: .+''',
'''build\((?!deps\): .+)''',
'''Initial [Cc]ommit.*''',
]
See also:
- Changelog
<#config-changelog>โ customize your changelog โจ changelog.mode<#config-changelog-mode>โ pick your changelog mode ('update'or'init') ๐ซ- Migrating an Existing Changelog
<#changelog-templates-migrating-existing-changelog>๐ฆ
๐ Defining your Release Branches
okay so this is the fun part. PSR has a genuinely powerful feature where you can manage release types across multiple branches โ which means you can set your project up so different branches do different jobs, like pre-release branches, beta branches, and your stable releases. main character energy for your whole branching strategy, honestly ๐
Note: most projects that do NOT publish pre-releases are gonna be totally fine with PSR's built-in default. don't overthink it bestie ๐
Wanna define an alpha pre-release branch for when you're working on a fix or a new feature? drop this into your pyproject.toml:
[tool.semantic_release.branches.alpha]
# Matches branches with the prefixes 'feat/', 'fix/', or 'perf/'.
match = "^(feat|fix|perf)/.+"
prerelease = true
prerelease_token = "alpha"
so any time you run semantic-release version on a branch with the prefix feat/, fix/, or perf/, PSR will figure out if a version bump is needed, and if it is, the resulting version is gonna be a pre-release version with the alpha token. like, for example:
- branch
main, version bump Patch, current version1.0.0โ next version1.0.1 - branch
fix/bug-1, version bump Patch, current version1.0.0โ next version1.0.1-alpha.1
see? it just knows. โจ
See also:
- Multibranch Releases
<#multibranch-releases>โ learn all about multi-branch releases and how to configure them ๐ซถ
๐ Configuring VCS Releases
You can set Python Semantic Release up to create Releases in your remote version control system, so you can publish assets and release notes for your project. cute, right? ๐
To do that, you're gonna need to put an authentication token in the right environment variable so Python Semantic Release can authenticate with the remote VCS to push tags, create releases, or upload files. no token, no vibe check passed.
๐ GitHub (GH_TOKEN)
For local publishing to GitHub, you should use a personal access token and store it in your environment variables. Specify the name of the environment variable in your remote.token setting <#config-remote-token>. The default is GH_TOKEN.
To generate a token go to https://github.com/settings/tokens and click on "Generate new token".
For Personal Access Token (classic), you will need the repo scope to write (ie. push) to the repository.
For fine-grained Personal Access Tokens, you will need the contents permission:
๐ฆ GitLab (GITLAB_TOKEN)
A personal access token from GitLab. This is used for authenticating when pushing tags, publishing releases etc. This token should be stored in the GITLAB_TOKEN environment variable.
๐ธ Gitea (GITEA_TOKEN)
A personal access token from Gitea. This token should be stored in the GITEA_TOKEN environment variable.
๐ Bitbucket (BITBUCKET_TOKEN)
ngl, Bitbucket does not support uploading releases, but it can still benefit from automated tags and changelogs ๐. The user has three options to push changes to the repository:
- Use SSH keys. ๐
- Use an App Secret โ
https://support.atlassian.com/bitbucket-cloud/docs/push-back-to-your-repository/#App-secretโ store the secret in theBITBUCKET_TOKENenvironment variable and the username inBITBUCKET_USER. - Use an Access Token for the repository โ
https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokensโ and store it in theBITBUCKET_TOKENenvironment variable.
See also:
- Changelog
<#config-changelog>โ customize your project's changelog โจ - Custom Release Notes
<#changelog-templates-custom-release-notes>โ customize the published release notes ๐ซ version --vcs-release/--no-vcs-releaseโ enable/disable VCS release creation ๐
๐งช Testing your Configuration
okay bestie, it's time to test your configuration! periodt ๐
# 1. Run the command in no-operation mode to see what would happen
semantic-release -v --noop version
# 2. If the output looks reasonable, try to run the command without any history changes
# '-vv' will give you verbose debug output, which is useful for troubleshooting
# commit parsing issues.
semantic-release -vv version --no-commit --no-tag
# 3. Evaluate your repository to see the changes that were made but not committed
# - Check the version number in your pyproject.toml
# - Check the distribution files from the build command
# - Check the changelog file for the new release notes
# 4. If everything looks good, make sure to commit/save your configuration changes
git add pyproject.toml
git commit -m "chore(config): configure Python Semantic Release"
# 5. Now, try to run the release command with your history changes but without pushing
semantic-release -v version --no-push --no-vcs-release
# 6. Check the result on your local repository
git status
git log --graph --decorate --all
# 7a. If you are happy with the release history and resulting commit & tag,
# reverse your changes before trying the full release command.
git tag -d v0.0.1 # replace with the actual version you released
git reset --hard HEAD~1
# 7b. [Optional] Once you have configured a remote VCS token, try
# running the full release command to update the remote repository.
semantic-release version --push --vcs-release
# This is optional as you may not want a personal access token set up or make
# make the release permanent yet.
See also:
cmd-version- Increasing Verbosity
<#troubleshooting-verbosity>๐
โก Configuring CI/CD
PSR is literally meant to help you release at speed, so go check out our CI/CD Configuration guides under the Automated Releases <#automatic> section. ship it ๐ข
๐ Commit Parsing
One of the core components of Python Semantic Release (PSR) is the commit parser. The commit parser is responsible for parsing a Project's Git Repository commit history to extract insights about project changes and make decisions based on this insight. it's basically the brain of the whole operation ๐ง
The primary decision that PSR makes based on the commit history is whether or not to release a new version of the project, and if so, what version number to release. This decision is made based on the commit message descriptions of the change impact introduced by the commit. The change impact describes the impact to the end consumers of the project. Depending on the type of change, the version number will be incremented according to the Semantic Versioning specification (semver) at https://semver.org/. It is the commit parser's job to extract the change impact from the commit message to determine the severity of the changes and then subsequently determine the semver level that the version should be bumped to for the next release. no cap ๐
The commit parser is also responsible for interpreting other aspects of the commit message which can be used to generate a helpful and detailed changelog. This includes extracting the type of change, the scope of the change, any breaking change descriptions, any linked pull/merge request numbers, and any linked issue numbers.
PSR provides several built-in commit parsers to handle a variety of different commit message styles. And if the built-in parsers do not meet your needs, you can write your own custom parser to handle your specific commit message style. build your own, king ๐
Warning: PSR's built-in commit parsers are designed to be flexible enough to provide a convenient way to generate the most effective changelogs we can, which means some features are added beyond the scope of the original commit message style guidelines. Other tools may not follow the same conventions as PSR's guideline extensions, so if you plan to use any similar programs in tandem with PSR, you should be aware of the differences in feature support and fall back to the official format guidelines if necessary. โ ๏ธ not me warning you twice but like, be careful bestie
๐ Built-in Commit Parsers
The following parsers are built in to Python Semantic Release:
ConventionalCommitParserConventionalCommitMonorepoParser(available in v10.4.0+) โจAngularCommitParser(deprecated in v9.19.0) ๐EmojiCommitParserScipyCommitParserTagCommitParser(deprecated in v9.12.0) ๐
๐ Conventional Commits Parser
Introduced in v9.19.0
A parser that is designed to parse commits formatted according to the Conventional Commits Specification at https://www.conventionalcommits.org/en/v1.0.0. The parser is implemented with the following logic in relation to PSR's core features:
- Version Bump Determination</p> โ so like, this parser peeks at the commit type sitting in the subject line of the commit (that's the first line of a commit message, bestie, the headline of the whole thing ๐
). That type gets matched against the config mapping to figure out the level bump for that specific commit. If the commit type isn't in the config mapping, no cap, the commit is considered a non-parsable commit and it gets returned as a
ParseErrorobject and ultimately a commit of type"unknown"๐ญ. The config mapping holds lists of commit types that correspond to the level bump for each commit type. Some commit types are still valid but just do not trigger a level bump โ think"chore"or"docs"โ they're just vibing, living their life. You can also configure the default level bumpcommit_parser_options.default_level_bump(see#config-commit-parser-options) if you want. And to trigger a major release, the commit message body must contain a paragraph that begins withBREAKING CHANGE:. That overrides the level bump determined by the commit type, periodt. ๐ - Changelog Generation</p> โ PSR groups commits in the changelog by the commit type used in the commit message. The commit type shorthand gets converted to a more human-friendly section heading and then used as the version section title of the changelog and release notes. Under that section title, the parsed commit descriptions are listed out in full โ all of them, no skimming โจ. If the commit includes an optional scope, that scope gets prefixed onto the first line of the commit description. If a commit has any breaking change prefixed paragraphs in the commit message body, those paragraphs are separated out into a "Breaking Changes" section in the changelog (the Breaking Changes section is available from the default changelog in v9.15.0 ๐). Each breaking change paragraph is listed in a bulleted list format across the entire version. A single commit is allowed to have more than one breaking change prefixed paragraph (as opposed to the Conventional Commits Specification
https://www.conventionalcommits.org/en/v1.0.0). Commits with an optional scope and a breaking change will have the scope prefixed onto the breaking change paragraph. Parsing errors return aParseErrorobject and ultimately a commit of type"unknown". Unknown commits are consolidated into an"Unknown"section in the changelog by the default template. And to remove unwanted commits from the changelog that normally get placed in the"unknown"section, consider using the configuration optionchangelog.exclude_commit_patterns(see#config-changelog-exclude-commit-patterns) to ignore those commit styles ๐ซถ. - Pull/Merge Request Identifier Detection</p> โ this parser implements PSR's Common Linked Merge Request Detection to identify and extract pull/merge request numbers. The parser returns a string value if a pull/merge request number is found in the commit message. If no pull/merge request number is found, the parser returns an empty string. Simple as that ๐ธ.
- Linked Issue Identifier Detection</p> โ this parser implements PSR's Common Issue Identifier Detection to identify and extract issue numbers. The parser returns a tuple of issue numbers as strings if any are found in the commit message. If no issue numbers are found, the parser returns an empty tuple. Iconic behaviour honestly ๐ฆ.
- Squash Commit Evaluation</p> โ this parser implements PSR's Common Squash Commit Evaluation to identify and extract each commit message as a separate commit message within a single squashed commit. You can toggle this feature on/off via the
commit_parser_optionssetting (see#config-commit-parser-options) ๐ฅ. - Release Notice Footer Detection</p> โ this parser implements PSR's Common Release Notice Footer Detection, which is a custom extension to the traditional Conventional Commits Specification
https://www.conventionalcommits.org/en/v1.0.0so you can use theNOTICEkeyword as a git footer to document additional release information that is not considered a breaking change. Cute, informative, not dramatic โจ.
Limitations: ๐
- Commits with the
reverttype are not currently supported. Track the implementation of this feature in the issue #402https://github.com/python-semantic-release/python-semantic-release/issues/402. (Not me waiting on that one ๐)
If no commit parser options are provided via the configuration, the parser will use PSR's built-in defaults (see #semantic_release.commit_parser.conventional.options.ConventionalCommitParserOptions) ๐.
Conventional Commits Monorepo Parser ๐ข๐
Introduced in v10.4.0
Important: In order for this parser to be effective, please review the section titled Releasing Packages from a Monorepo (see #monorepos) for details on file structure, configurations, and release actions. Bestie, actually read it, I'm begging ๐ฅบ
This parser is an extension of the Conventional Commits Parser, designed specifically for monorepo environments. A monorepo environment is defined as a single source control repository that contains multiple packages, each of which can be released independently and may have different version numbers. Yes, multiple packages, multiple versions, one repo, one girlboss ๐ .
This parser introduces two new configuration options that determine which packages are affected by a commit. These options control whether a commit is considered for version determination, changelog generation, and other release actions for the relevant packages. The 2 new configuration options are path_filters (see #semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions.path_filters) and scope_prefix (see #semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions.scope_prefix).
Features: ๐
- Package Specific Commit Filtering โ for monorepo support, this parser uses 2 filtering rules to determine if a commit should be considered for a specific package. The first rule is based on file paths that are changed in the commit, and the second rule is based on the optional scope prefix defined in the commit message. If either rule matches, then the commit is considered relevant to that package and will be used in version determination, changelog generation, etc, for that package. If neither rule matches, then the commit is ignored for that package. File path filtering rules are applied first and are the primary way to determine package relevance. The
path_filtersoption (see#semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions.path_filters) allows for specifying a list of file path patterns and will also support negated patterns to ignore specific paths that otherwise would be selected from the file glob pattern. Negated patterns are defined by prefixing the pattern with an exclamation point (!). File path filtering is quite effective by itself, but to handle the edge cases, the parser has thescope_prefixconfiguration option (see#semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions.scope_prefix) to allow the developer to specifically define when the commit is relevant to the package. In monorepo setups, there are often shared files between packages (generally at the root project level) that are modified occasionally but not always relevant to the package being released. Since you do not want to define this path in the package configuration as it may not be relevant to the release, then this parser will look for a match with the scope prefix. The scope prefix is a regular expression that is used to match the text inside the scope field of a Conventional Commit. The scope prefix is optional and is used only if file path filtering does not match. Commits that have matching files in the commit will be considered relevant to the package regardless if a scope prefix exists or if it matches ๐ฅ. - Version Bump Determination โ once package-specific commit filtering is applied, the relevant commits are passed to the Conventional Commits Parser for evaluation and then used for version bump determination. See Conventional Commits Parser for details ๐.
- Changelog Generation โ once package-specific commit filtering is applied, the relevant commits are passed to the Conventional Commits Parser for evaluation and then used for changelog generation. See Conventional Commits Parser for details โจ.
- Pull/Merge Request Identifier Detection โ once package-specific commit filtering is applied, the relevant commits are passed to the Conventional Commits Parser for pull/merge request identifier detection. See Common Linked Merge Request Detection for details ๐.
- Linked Issue Identifier Detection โ once package-specific commit filtering is applied, the relevant commits are passed to the Conventional Commits Parser for linked issue identifier detection. See Common Issue Identifier Detection for details ๐ซถ.
- Squash Commit Evaluation โ squashed commits are separated out into individual commits with the same set of changed files BEFORE the package-specific commit filtering is applied. Each pseudo-commit is then subjected to the same filtering rules as regular commits. See Common Squash Commit Evaluation for details ๐.
- Release Notice Footer Detection โ once package-specific commit filtering is applied, the relevant commits are passed to the Conventional Commits Parser for release notice footer detection. See Common Release Notice Footer Detection for details โญ.
Limitations: ๐
revertcommit type is NOT supported, see Conventional Commits Parser's limitations for details. (Yeah, still no revert, we been knew ๐)
If no commit parser options are provided via the configuration, the parser will use PSR's built-in defaults (see #semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions) ๐.
Angular Commit Parser ๐ญ
Warning: This parser was deprecated in v9.19.0. It will be removed in a future release. This parser is being replaced by the Conventional Commits Parser. No cap, she's retiring, go say hi to the Conventional Commits Parser instead ๐
A parser that is designed to parse commits formatted according to the Angular Commit Style Guidelines https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits. The parser is implemented with the following logic in relation to how PSR's core features:
- Version Bump Determination ๐ โ okay so this parser pulls the commit type out of the subject line of the commit (that's the very first line of a commit message, bestie). That type gets matched against the configuration mapping to figure out the level bump for that specific commit. If the commit type isn't found in the configuration mapping, it's a non-parsable commit โ it comes back as a
ParseErrorobject and, ultimately, a commit of type"unknown"๐. The configuration mapping holds lists of commit types, each one corresponding to the level bump for that commit type. And lowkey, some commit types are still valid but do not trigger a level bump at all โ think"chore"or"docs". No bump, no drama ๐. You can also configure the default level bump withcommit_parser_options.default_level_bump(#config-commit-parser-options) if you want. And to trigger a major release, the commit message body has to contain a paragraph that begins withBREAKING CHANGE:. That overrides the level bump determined by the commit type. periodt ๐ - Changelog Generation โจ โ PSR groups commits in the changelog by the commit type used in the commit message. That commit type shorthand gets converted into a way more human-friendly section heading, and that becomes the version section title of the changelog and release notes. Under the section title, the parsed commit descriptions are listed out in full, no skimping ๐. If the commit includes an optional scope, that scope is prefixed on to the first line of the commit description. And if a commit has any breaking-change-prefixed paragraphs in the commit message body, those paragraphs get separated out into a
"Breaking Changes"section in the changelog (the Breaking Changes section is available from the default changelog in v9.15.0). Each breaking change paragraph is listed in a bulleted list format across the entire version. A single commit is allowed to have more than one breaking change prefixed paragraph (as opposed to the Angular Commit Style Guidelines athttps://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits). Commits with an optional scope and a breaking change get the scope prefixed on to the breaking change paragraph too. Parsing errors return aParseErrorobject and, ultimately, a commit of type"unknown". Unknown commits get consolidated into an"Unknown"section in the changelog by the default template. Wanna yeet the unwanted commits that normally land in the"unknown"section? Peep the configuration optionchangelog.exclude_commit_patterns(#config-changelog-exclude-commit-patterns) to ignore those commit styles ๐ง - Pull/Merge Request Identifier Detection ๐ฅ โ this parser implements PSR's Common Linked Merge Request Detection to identify and extract pull/merge request numbers. The parser returns a string value if a pull/merge request number is found in the commit message. If no pull/merge request number is found, the parser returns an empty string. Feature available in v9.13.0+ โญ
- Linked Issue Identifier Detection ๐ โ this parser implements PSR's Common Issue Identifier Detection to identify and extract issue numbers. The parser returns a tuple of issue numbers as strings if any are found in the commit message. If no issue numbers are found, the parser returns an empty tuple. Feature available in v9.15.0+ ๐
- Squash Commit Evaluation ๐ฆ โ this parser implements PSR's Common Squash Commit Evaluation to identify and extract each commit message as a separate commit message within a single squashed commit. You can toggle this feature on/off via the
commit_parser_options(#config-commit-parser-options) setting. Feature available in v9.17.0+ ๐ธ - Release Notice Footer Detection ๐ โ this parser implements PSR's Common Release Notice Footer Detection, which is a custom extension to the traditional Angular Commit Style Guidelines at
https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commitsto use theNOTICEkeyword as a git footer to document additional release information that is not considered a breaking change. Feature available in v9.18.0+ ๐
Limitations: ๐ซ
- Commits with the
reverttype are not currently supported. Track the implementation of this feature in issue #402 athttps://github.com/python-semantic-release/python-semantic-release/issues/402.
If no commit parser options are provided via the configuration, the parser will use PSR's built-in defaults (#semantic_release.commit_parser.angular.AngularParserOptions) โ
Emoji Commit Parser ๐ญ๐
A parser that's designed to parse commits formatted to the Gitmoji Specification at https://gitmoji.dev/specification, with a few extra features that the spec doesn't cover but that give you similar functionality to what you'd expect from a Semantic Release tool. As the Gitmoji Specification at https://gitmoji.dev/specification describes, the emojis can be specified in either the unicode format or the shortcode text format. Go read the Gitmoji Specification at https://gitmoji.dev/specification for the pros and cons of which format to use, but regardless: your configuration options must match the format actually used in your commit messages. iykyk ๐
The parser is implemented with the following logic in relation to how PSR's core features work:
- Version Bump Determination โ this parser only looks for emojis in the subject line of the commit (the first line of a commit message). If more than one emoji is found, the emoji configured with the highest priority is the one selected for the change impact for that specific commit. The highest-priority emoji is the one configured in the
majorconfiguration option, followed byminor, andpatch, in descending priority order. If no emoji is found in the subject line, the commit is classified asotherand defaults to the level bump defined by the configuration optioncommit_parser_options.default_level_bump(#config-commit-parser-options) ๐ - Changelog Generation โ PSR groups commits in the changelog by the emoji type used in the commit message. The emoji becomes the version section title, and the commit descriptions are listed under that section. No emojis are removed from the commit message, so every single one of them will be listed in the changelog and release notes ๐. When more than one emoji is found in the subject line of a commit, the highest-priority emoji is the one that influences the grouping of the commit in the changelog. Commits containing no emojis or non-configured emojis get consolidated into an
"Other"section. Wanna clean out the unwanted commits that would normally land in the"other"section? Consider the configuration optionchangelog.exclude_commit_patterns(#config-changelog-exclude-commit-patterns) to ignore those commit styles ๐ - Pull/Merge Request Identifier Detection โ this parser implements PSR's Common Linked Merge Request Detection to identify and extract pull/merge request numbers. The parser returns a string value if a pull/merge request number is found in the commit message. If no pull/merge request number is found, the parser returns an empty string. Feature available in v9.13.0+ โญ
- Linked Issue Identifier Detection โ [Disabled by default] this parser implements PSR's Common Issue Identifier Detection to identify and extract issue numbers. The parser returns a tuple of issue numbers as strings if any are found in the commit message. If no issue numbers are found, the parser returns an empty tuple. This feature is disabled by default since it is not a part of the Gitmoji Specification at
https://gitmoji.dev/specification, but you can enable it by setting the configuration optioncommit_parser_options.parse_linked_issuestotrue. Feature available in v9.15.0+ ๐ - Squash Commit Evaluation โ this parser implements PSR's Common Squash Commit Evaluation to identify and extract each commit message as a separate commit message within a single squashed commit. You can toggle this feature on/off via the
commit_parser_options(#config-commit-parser-options) setting. Feature available in v9.17.0+ ๐ฆ - Release Notice Footer Detection โ this parser implements PSR's Common Release Notice Footer Detection, which is a custom extension that uses the
NOTICEkeyword as a git footer to document additional release information that is not considered a breaking change. Feature available in v9.18.0+ ๐
If no commit parser options are provided via the configuration, the parser will use PSR's built-in defaults (#semantic_release.commit_parser.emoji.EmojiParserOptions) โ
Scipy Commit Parser ๐งช
A parser designed to parse commits formatted according to the Scipy Commit Style Guidelines at https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#writing-the-commit-message. Basically it's a variation of the Angular Commit Style Guidelines at https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits but with all different commit types. And because that variance is so small, this parser just extends our Angular Commit Parser with pre-defined scipy commit types in the default Scipy Parser Options, and every other feature is inherited ๐
Limitations: ๐ซ
- Commits with the
REVtype are not currently supported. Track the implementation of this feature in issue #402 athttps://github.com/python-semantic-release/python-semantic-release/issues/402.
If no commit parser options are provided via the configuration, the parser will use PSR's built-in defaults (#semantic_release.commit_parser.scipy.ScipyParserOptions) โ
Tag Commit Parser ๐ท๏ธ
Warning: โ ๏ธ This parser was deprecated in v9.12.0. It will be removed in a future release.
The original parser from v1.0.0 of Python Semantic Release. Similar to the emoji parser above, but with fewer features ๐ฅฒ
If no commit parser options are provided via the configuration, the parser will use PSR's built-in defaults (#semantic_release.commit_parser.tag.TagParserOptions) โ
Common Linked Merge Request Detection ๐
Introduced in v9.13.0 โจ
All of the PSR built-in parsers implement common pull/merge request identifier detection logic to extract pull/merge request numbers from the commit message, no matter the VCS platform. The parsers evaluate the subject line for a parenthesis-enclosed number at the end of the line. PSR's parsers will return a string value if a pull/merge request number is found in the commit message. If no pull/merge request number is found, the parsers will return an empty string ๐
Examples: ๐
Alllll of the following will hand you back a MR number of x123, where x is the character prefix ๐
- BitBucket:
Merged in feat/my-awesome-feature (pull request #123) - GitHub:
feat: add new feature (#123) - GitLab:
fix: resolve an issue (!123)
๐ Common Issue Identifier Detection ๐
Introduced in v9.15.0
okay so every single one of the PSR built-in parsers has this common issue identifier detection logic baked in, and it's giving very much GitHub / GitLab / BitBucket energy โ same vibe as those platforms, basically. What the parsers do is go looking for the usual issue closure text prefixes in the Git Trailer format (https://git-scm.com/docs/git-interpret-trailers) inside the commit message, and then they identify + extract the issue numbers. The detection logic is not strict to any one specific issue tracker because PSR is trying to be flexible about finding issue numbers โ but bestie, being flexible comes at a price: you must use that Git Trailer format with a colon (:) as the token separator. That's the deal, no cap.
PSR attempts to support all the variants of issue closure text prefixes, but heads up: not all of them will work for your VCS. Here's what PSR supports โ case-insensitive, plus their conjugations (plural, present, & past tense):
- close (closes, closing, closed)
- fix (fixes, fixing, fixed)
- resolve (resolves, resolving, resolved)
- implement (implements, implementing, implemented)
PSR also lets you be flexible about spotting more than one issue number without needing extra git trailers (though yes, PSR does support multiple git trailers too, she's versatile like that ๐). PSR supports various list formats so you can identify multiple issues in one list. Fair warning though: this format will not necessarily work on your VCS. Currently PSR supports these list formats:
- comma-separated (ex.
Closes: #123, #456, #789) - space-separated (ex.
resolve: #123 #456 #789) - semicolon-separated (ex.
Fixes: #123; #456; #789) - slash-separated (ex.
close: #123/#456/#789) - ampersand-separated (ex.
Implement: #123 & #789) - and-separated (ex.
Resolve: #123 and #456 and #789) - mixed (ex.
Closed: #123, #456, and #789orFixes: #123, #456 & #789)
Every single example up there uses the most common issue number prefix (#), but PSR is flexible enough to support other prefixes that VCS platforms or issue trackers use, like JIRA (ex. ABC-###).
If any issue numbers are found in the commit message, the parsers return a tuple of issue numbers as strings. Why strings? So that any issue number prefix characters get preserved (ex. #123 or ABC-123). And if no issue numbers are found at all? The parsers return an empty tuple. Simple as. โจ
References:
- BitBucket: Resolving Issues Automatically โ
https://support.atlassian.com/bitbucket-cloud/docs/resolve-issues-automatically-when-users-push-code/ - GitHub: Linking Issue to PR โ
https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue - GitLab: Default Closing Patterns โ
https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#default-closing-pattern
๐ Common Release Notice Footer Detection ๐
*Introduced in v9.18.0**
All the PSR built-in parsers implement common release notice footer detection logic, and its whole job is to find and extract a NOTICE git trailer โ aka the place a developer documents any extra release info they want the software consumer to know about. The idea literally extends from the concept of the BREAKING CHANGE: git trailer, which documents breaking change descriptions. But the NOTICE trailer is meant for info that's below the threshold of a breaking change while still being important enough that the software consumer should be aware of it. Common uses? Dropping deprecation warnings, or giving more detailed change usage info for that release. ๐ซถ
Parsers will collapse single newlines after the NOTICE trailer into a single line paragraph. And a commit can have more than one NOTICE trailer in a single commit message โ she can multitask. Each ParsedCommit (#semantic_release.commit_parser.token.ParsedCommit) will have a release_notices attribute that is a tuple of string paragraphs, one per release notice.
In the default changelog and release notes template, these release notices get formatted into their very own section called Additional Release Information. Each one includes any commit scope defined, and each release notice appears in alphabetical order. Organized queen. ๐
๐ธ Common Squash Commit Evaluation ๐ธ
Introduced in v9.17.0
Every PSR built-in parser implements common squash commit evaluation logic, which identifies and extracts the individual commit messages out of a single squashed commit. The parsers look for common squash commit delimiters plus multiple matches of the commit message format, so they can find each individual commit message that got squashed. What you get back is a list containing each commit message as a separate commit object. Squashed commits get evaluated individually for both the level bump and changelog generation. And if no squash commits are found? You get a list with the single commit object in it.
Currently PSR has been tested against GitHub, BitBucket, and official git squash merge commit messages. GitLab doesn't have a default template for squash commit messages, but you can customize it per project or server. So if you're on GitLab, bestie, you need to make sure your squash commit message format is similar to the example below. ๐
Example:
The following example will extract three separate commit messages from a single GitHub formatted squash commit message of conventional commit style:
feat(config): add new config option (#123)
* refactor(config): change the implementation of config loading
* docs(configuration): defined new config option for the project
When parsed with the default conventional-commit parser with squash commits toggled on, the version bump will be determined by the highest level bump of the three commits (in this case, a minor bump because of the feature commit) and the release notes would look similar to the following:
## Features
- **config**: add new config option (#123)
## Documentation
- **configuration**: defined new config option for the project (#123)
## Refactoring
- **config**: change the implementation of config loading (#123)
Merge request numbers and commit hash values will be the same across all extracted commits. Also, any exclude_commit_patterns (#config-changelog-exclude-commit-patterns) get applied individually to each extracted commit โ so if you have an exclusion match for ignoring refactor commits, that second commit in the example above would be excluded from the changelog. Bye bye refactor commit ๐
Important: When squash commit evaluation is enabled, if you squashed a higher level bump commit into the body of a lower level bump commit, the higher level bump commit will be evaluated as the level bump for the entire squashed commit. This includes breaking change descriptions.
๐ Customization ๐
Each of the built-in parsers can be customized by providing overrides in the commit_parser_options (#config-commit-parser-options) setting of the configuration file. Use this to toggle parsing features on and off, or to add, modify, or remove the commit types that determine the level bump for a commit. Go review the API documentation for your specific parser's options class to see what changes to the default behavior you're allowed to make. Customize away, it's your world โจ
๐ฆ Custom Parsers ๐ฆ
Custom parsers can be written to handle commit message styles that the built-in parsers don't cover โ or that option customization of the built-in parsers can't reach. Sometimes you just gotta write your own, and that's valid.
Python Semantic Release provides several building blocks to help you write your parser. To maintain compatibility with how Python Semantic Release will invoke your parser, you should use the appropriate object as described below โ or create your own object as a subclass of the original that maintains the same interface. Type parameters are defined where appropriate to assist with static type-checking. ๐ฅ
The commit_parser (#config-commit-parser) option, if it's set to a string that does not match one of Python Semantic Release's built-in commit parsers, will be used to attempt to dynamically import a custom commit parser class.
In order to use your custom parser, you must provide how to import the module and class via the configuration option. There are two ways to provide the import string:
- File Path & Class: The format is
"path/to/module_file.py:ClassName". This is the easiest way to provide a custom parser. This method allows you to store your custom parser directly in the repository with no additional installation steps. PSR will locate the file, load the module, and instantiate the class. Relative paths are recommended and it should be provided relative to the current working directory. This import variant is available in v9.16.0 and later. - Module Path & Class: The format is
"package.module_name:ClassName". This method allows you to store your custom parser in a package that is installed in the same environment as PSR. This method is useful if you want to share your custom parser across multiple repositories. To share it across multiple repositories you'll generally need to publish the parser as its own separate package, and thenpip installit into the current virtual environment. You can also keep it in the same repository as your project as long as it's in the current directory of the virtual environment and is locatable by the Python import system. You may need to set thePYTHONPATHenvironment variable if you have a more complex directory structure. This import variant is available in v8.0.0 and later.
To test that your custom parser is importable, you can run the following command in the directory where PSR will be executed:
python -c "from package.module_name import ClassName"
Note: Remember this is basic python import rules, so the package name is optional and generally packages are defined by a directory with __init__.py files.
Tokens
The tokens baked into Python Semantic Release's commit parsing mechanism are inspired by two very iconic sources: the error-handling mechanism in Rust's error handling (https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html) and its implementation in black (https://github.com/psf/black/blob/main/src/black/rusty.py). It is documented that catching exceptions in Python is slower (https://docs.python.org/3/faq/design.html#how-fast-are-exceptions) than the equivalent guard implemented using if/else checking when exceptions are actually caught, so although try/except blocks are cheap if no exception is raised, commit parsers should always return an object such as ParseError <#semantic_release.commit_parser.token.ParseError> instead of raising an error immediately. Why? Because otherwise you'd be catching a potentially large number of parsing errors as the commit history of a repository is being parsed. Not the vibe. Python Semantic Release does not raise an exception if a commit cannot be parsed. ๐
Python Semantic Release uses ParsedCommit <#semantic_release.commit_parser.token.ParsedCommit> as the return type of a successful parse operation, and ParseError <#semantic_release.commit_parser.token.ParseError> as the return type from an unsuccessful parse of a commit. Bestie, you should review the API documentation linked to understand the fields available on each of these objects. ๐
It is important to note, the ParseError <#semantic_release.commit_parser.token.ParseError> implements an additional method, raise_error. This method raises a CommitParseError <#semantic_release.errors.CommitParseError> with the message contained in the error field, as a convenience.
In Python Semantic Release, the type semantic_release.commit_parser.token.ParseResult is defined as ParseResultType[ParsedCommit, ParseError], as a convenient shorthand. ๐ซถ
ParseResultType is a generic type, which is the Union of its two type parameters. One of the types in this union should be the type returned on a successful parse of the commit, while the other should be the type returned on an unsuccessful parse of the commit.
A custom parser result type, therefore, could be implemented as follows:
MyParsedCommitsubclassesParsedCommit<#semantic_release.commit_parser.token.ParsedCommit>MyParseErrorsubclassesParseError<#semantic_release.commit_parser.token.ParseError>MyParseResult = ParseResultType[MyParsedCommit, MyParseError]
Internally, Python Semantic Release uses isinstance() to determine if the result of parsing a commit was a success or not, so you should check that your custom result and error types return True from isinstance(<object>, ParsedCommit) and isinstance(<object>, ParseError) respectively. Literally the vibe check of the whole parsing pipeline. โจ
While it's not advisable to remove any of the fields that are available in the built-in token types, currently only the bump field of the successful result type is used to determine how the version should be incremented as part of this release. However, it's perfectly possible to add additional fields to your tokens which can be populated by your parser; these fields will then be available on each commit in your changelog template <#changelog-templates>, so you can make additional information available. Extra data? We love to see it. ๐
Parser Options
When writing your own parser, you should accompany the parser with an "options" class which accepts the appropriate keyword arguments. This class' __init__ method should store the values that are needed for parsing appropriately. Python Semantic Release will pass any configuration options from the configuration file's commit_parser_options <#config-commit-parser-options> into your custom parser options class. To ensure that the configuration options are passed correctly, the options class should inherit from the ParserOptions class.
The "options" class is used to validate the options which are configured in the repository, and to provide default values for these options where appropriate. So it's giving validator and fallback bestie at the same time. ๐ฆ
Commit Parsers
The commit parsers that are built into Python Semantic Release implement an instance method called parse, which takes a single parameter commit of type git.objects.commit.Commit <gitpython-commit-object>, and returns the type ParseResultType.
To be compatible with Python Semantic Release, a commit parser must subclass CommitParser. A subclass must implement the following:
- A class-level attribute
parser_options, which must be set toParserOptionsor a subclass of this. - An
__init__method which takes a single parameter,options, that should be of the same type as the class'parser_optionsattribute. - A method,
parse, which takes a single parametercommitthat is of typegit.objects.commit.Commit<gitpython-commit-object>, and returnsParseResult, or a subclass of this.
By default, the constructor for CommitParser will set the options parameter on the options attribute of the parser, so there is no need to override this in order to access self.options during the parse method. However, if you have any parsing logic that needs to be done only once, it may be a good idea to perform this logic during parser instantiation rather than inside the parse method. The parse method will be called once per commit in the repository's history during parsing, so the effect of slow parsing logic within the parse method will be magnified significantly for projects with sizeable Git histories. No cap โ one slow line in there and it's over for your big-repo besties. ๐
Commit Parsers have two type parameters, "TokenType" and "OptionsType". The first is the type which is returned by the parse method, and the second is the type of the "options" class for this parser.
Therefore, a custom commit parser could be implemented via:
class MyParserOptions(semantic_release.ParserOptions):
def __init__(self, message_prefix: str) -> None:
self.prefix = message_prefix * 2
class MyCommitParser(
semantic_release.CommitParser[semantic_release.ParseResult, MyParserOptions]
):
def parse(self, commit: git.objects.commit.Commit) -> semantic_release.ParseResult:
...
Version Change Reports
When using the cmd-version and cmd-changelog commands, Python Semantic Release (PSR) will generate a changelog and release notes for your project automatically in the default configuration. The changelog is rendered using the Jinja (https://jinja.palletsprojects.com/en/3.1.x/) template engine, and in the default configuration, PSR will use a built-in template file to render the changelog at the file location defined by the changelog_file <#config-changelog-changelog-file> setting. Automatic glow-up, zero effort. ๐
Through the use of the templating engine & the template_dir <#config-changelog-template-dir> configuration setting, you can customize the appearance of your changelog and release notes content. You may also generate a set of files using your custom template directory and the templates will be rendered relative to the root of your repository.
Because PSR uses a third-party library, Jinja (https://jinja.palletsprojects.com/en/3.1.x/), as its template engine, we do not include all the syntax within our documentation but rather you should refer to the Template Designer Documentation (https://jinja.palletsprojects.com/en/3.1.x/templates/) for guidance on how to customize the appearance of your release files. If you would like to customize the template environment itself, then certain options are available to you via changelog environment configuration <#config-changelog-environment>.
If you do not want to use the changelog generation features, you can disable changelog generation entirely during the cmd-version command by providing the --no-changelog command-line option.
Using the Default Changelog
If you don't provide any custom templates in the changelog.template_dir <#config-changelog-template-dir>, the default changelog templates will be used to render the changelog. Defaults ate, honestly. ๐
PSR provides two default changelog output formats:
- Markdown (
.md), default - reStructuredText (
.rst), available since v9.11.0
Both formats are kept in sync with one another to display the equivalent information in the respective format. The default changelog template is located in the data/templates/ directory within the PSR package. The templates are written in modular style (ie. multiple files) and during the render process are ultimately combined together to render the final changelog output. The rendering start point is the CHANGELOG.{FORMAT_EXT}.j2 underneath the respective format directory.
PSR provides a few configuration options to customize the default changelog output and can be found under the changelog.default_templates <#config-changelog-default-templates> section as well as some common configuration options under the changelog <#config-changelog> section.
To toggle the output format, you only need to set the changelog.default_templates.changelog_file <#config-changelog-default-templates-changelog-file> file name to include the desired file extension (.md or .rst). If you would like a different extension for the resulting changelog file, but would like to still have control over the template format, you can set the changelog.default_templates.output_format <#config-changelog-default-templates-output-format> configuration setting to the desired format.
A common and highly-recommended configuration option is the changelog.exclude_commit_patterns <#config-changelog-exclude-commit-patterns> setting which allows the user to define regular expressions that will exclude commits from the changelog output. This is useful to filter out change messages that are not relevant to your external consumers (ex. ci and test in the conventional commit standard) and only include the important changes that impact the consumer of your software. Keep the feed clean, bestie. ๐ง
Another important configuration option is the changelog.mode <#config-changelog-mode> setting which determines the behavior of the changelog generation. There are 2 modes that available that described in detail below.
- Initialization Mode when
mode = "init". - Update Mode when
mode = "update".
Initialization Mode
When using the initialization mode, the changelog file will be created from scratch using the entire git history and overwrite any existing changelog file. This is the default behavior introduced in v8.0.0. This is useful when you are trying to convert over to Python Semantic Release for the first time or when you want to automatically update the entire format of your changelog file. Fresh start energy. ๐ธ
Warning: If you have an existing changelog in the location you have configured with the changelog.changelog_file <#config-changelog-changelog-file> setting, PSR will overwrite the contents of this file on each release. Please make sure to refer to Migrating an Existing Changelog.
โ ๏ธ Like, actually read that warning. It will not ask twice and it will not feel bad about it. ๐
๐ซถ Update Mode ๐ซถ
Note: introduced in v9.10.0, bestie. It's giving fresh off the press. ๐
So when you're in update mode, the only thing that gets added to your existing changelog file is the change info from the last release โ and it gets prepended into the file that's defined by changelog.changelog_file. That's it. That's the whole vibe.
This lowkey mimics the behavior that was used in versions prior to v8.0.0 โ back before the conversion to a templating engine โ except now it uses Jinja to accomplish the update. โจ
This mode is best suited for managing changes over the lifetime of your project when you may have a need to make manual changes or adjustments to the changelog and it's not easily recreated with a template. Like, if you and your changelog have a whole relationship going on, this is the mode for you. ๐ฅฐ
โจ How It Works โจ
In order to insert the new release information into an existing changelog file, your changelog file must have an insertion flag to indicate where the new release information should be inserted. Think of it as a little bookmark that says "new stuff goes here, queen." ๐
The default template will read in your existing changelog file, split the content based on the insertion flag, and then recombine the content (including the insertion flag โ she stays) with the new release information added after the insertion flag.
The insertion flag is customizable through the changelog.insertion_flag setting. Generally, your insertion flag should be unique text to your changelog file to avoid any unexpected behavior. See the examples below. ๐
In the case where the insertion flag is NOT found in the existing changelog file, the changelog file will be re-written without any changes. (Not me quietly doing nothingโฆ ๐ it literally just rewrites itself identical.)
If there is no existing changelog file found, then the changelog file will be initialized from scratch as if the mode was set to init, except the changelog.insertion_flag will be included into the newly created changelog file. ๐
Tip: we have accomplished changelog updating through the use of the Jinja templating and additional context filters and context variables. This is notable because in the case that you want to customize your changelog template, you now can use the same logic to enable changelog updates of your custom template! Slay.
See also:
- Migrating an Existing Changelog.
๐ธ Example ๐ธ
Given your existing changelog looks like the following with a changelog.insertion_flag set to <!-- version list -->, when you run the cmd-version command, the new release information will be inserted after the insertion flag.
Before
# CHANGELOG
<!-- version list -->
## 1.0.0
- Initial Release
After
# CHANGELOG
<!-- version list -->
## v1.1.0
### Feature
- feat: added a new feature
### Fix
- fix: resolved divide by zero error
## 1.0.0
- Initial Release
๐ง Configuration Examples ๐ง
- Goal: Configure an updating reStructuredText changelog with a custom insertion flag within
pyproject.toml.
[tool.semantic_release.changelog]
mode = "update"
insertion_flag = "..\n All versions below are listed in reverse chronological order"
[tool.semantic_release.changelog.default_templates]
changelog_file = "CHANGELOG.rst"
output_format = "rst" # optional because of the file extension
- Goal: Configure an updating Markdown changelog with custom file name and default insertion flag within a separate config file
releaserc.json.
{
"semantic_release": {
"changelog": {
"mode": "update",
"default_templates": {
"changelog_file": "docs/HISTORY",
"output_format": "md"
}
}
}
}
- Goal: Configure an initializing reStructuredText changelog with filtered conventional commits patterns and merge commits within a custom config file
releaserc.toml.
[semantic_release.changelog]
mode = "init"
default_templates = { changelog_file = "docs/CHANGELOG.rst" }
exclude_commit_patterns = [
'''chore(?:\([^)]*?\))?: .+''',
'''ci(?:\([^)]*?\))?: .+''',
'''refactor(?:\([^)]*?\))?: .+''',
'''style(?:\([^)]*?\))?: .+''',
'''test(?:\([^)]*?\))?: .+''',
'''build\((?!deps\): .+)''',
'''Merged? .*''',
]
If identified or supported by the parser, the default changelog templates will include a separate section of breaking changes and additional release information. Refer to the commit parsing section to see how to write commit messages that will be properly parsed and displayed in these sections. Write your commits right and they'll pop off in the changelog, fr fr. ๐
๐ Using the Default Release Notes ๐
PSR has the capability to generate release notes as part of the publishing of a new version, similar to the changelog. The release notes are generated using a Jinja template and posted to your remote version control server (VCS) such as GitHub, GitLab, etc. during the cmd-version command. PSR provides a default built-in template out-of-the-box for generating release notes. No setup, just vibes. ๐ฆ
The difference between the changelog and release notes is that the release notes only contain the changes for the current release. Due to the modularity of the PSR templates, the format is similar to an individual version of the default changelog but may include other version specific information.
At this time, the default template for version release notes is only available in Markdown format for all VCS types. That's the whole menu, bestie. ๐
If you want to review what the default release notes look like you can use the following command to print the release notes to the console (remove any configuration for defining a custom template directory):
# Create a current tag
git tag v1.0.0
semantic-release --noop changelog --post-to-release-tag v1.0.0
The default template provided by PSR will respect the mask_initial_release setting and will also add a comparison link to the previous release if one exists without customization. Iconic behavior, honestly. โจ
As of v9.18.0, the default release notes will also include a statement to declare which license the project was released under. PSR determines which license to declare based on the value of project.license-expression in the pyproject.toml file as defined in the PEP 639 specification. Legal girlies rise. โ๏ธ๐
See also:
- To personalize your release notes, see the Custom Release Notes section.
๐ Custom Changelogs ๐
If you would like to customize the appearance of your changelog, you can create your own custom templates and configure PSR to render your templates instead during the cmd-version and cmd-changelog commands. Main character template energy. ๐
To use a custom template, you need to create a directory within your repository and set the template_dir setting to the name of this directory. The default name is "templates".
Templates are identified by giving a .j2 extension to the template file. Any such templates have the .j2 extension removed from the target file. Therefore, to render an output file foo.csv, you should create a template called foo.csv.j2 within your template directory. Cute, right? ๐
If you have additional files that you would like to render alongside your changelog, you can place these files within the template directory. A file within your template directory which does not end in .j2 will not be treated as a template; it will be copied to its target location without being rendered by the template engine. (It's just along for the ride. ๐๏ธ)
Tip: hidden files within the template directory (i.e. filenames that begin with a period ".") are excluded from the rendering process. Hidden folders within the template directory are also excluded, along with all files and folders contained within them. This is useful for defining macros or other template components that should not be rendered individually.
Tip: when initially starting out at customizing your own changelog templates, you should reference the default template embedded within PSR. The template directory is located atdata/templates/within the PSR package. Within our templates directory we separate out each type of commit parser (e.g.conventional) and the content format type (e.g.markdown). You can copy this directory to your repository'stemplatesdirectory and then customize the templates to your liking. Steal her look, respectfully. ๐
๐ Directory Structure ๐
When the templates are rendered, files within the templates directory tree are output to the location within your repository that has the same relative path to the root of your project as the relative path of the template within the templates directory.
๐ Example ๐
An example project has the following structure:
example-project/
โโโ src/
โ โโโ example_project/
โ โโโ __init__.py
โโโ ch-templates/
โโโ CHANGELOG.md.j2
โโโ .components/
โ โโโ authors.md.j2
โโโ .macros.j2
โโโ src/
โ โโโ example_project/
โ โโโ data/
โ โโโ data.json.j2
โโโ static/
โโโ config.cfg
And a custom templates folder configured via the following snippet in pyproject.toml:
[tool.semantic_release.changelog]
template_dir = "ch-templates"
After running a release with Python Semantic Release, the directory structure of the project will now look like this (excluding the template directory):
example-project/
โโโ CHANGELOG.md
โโโ src/
โ โโโ example_project/
โ โโโ data/
โ โ โโโ data.json
โ โโโ __init__.py
โโโ static/
โโโ config.cfg
Importantly, note the following:
- There is no top-level
.macrosfile created, because hidden files are excluded from the rendering process. - There is no top-level
.componentsdirectory created, because hidden folders and all files and folders contained within it are excluded from the rendering process. - The
.components/authors.md.j2file is not rendered directly, however, it is used as a component to theCHANGELOG.md.j2via anincludestatement in the changelog template. - To render data files into the
src/folder, the path to which the template should be rendered has to be created within thech-templatesdirectory. - the
ch-templates/staticfolder gets created at the top-level of your project, and the filech-templates/static/config.cfgis copied โ not rendered โ into the new top-levelstaticfolder ๐ซถ
You may lowkey want to lean into this behavior to modularize your changelog template, to define macros in a separate file, or to reference static data you'd rather not duplicate between your template environment and the rest of your project. very main character of you honestly ๐
๐ธ Changelog Template Context ๐ธ
While it's rendering a directory tree, Python Semantic Release hands your templating environment all the info about the project's history so you can use it to generate the changelog and whatever other documents you're dreaming up โจ
The important project info shows up in the templating environment through the global variable context, or ctx for short. Inside the template environment, that context object has these attributes:
changelog_insertion_flag(str): the insertion flag that decides where the new release info should get inserted into the changelog file. This value is passed straight through fromchangelog.insertion_flag(<#config-changelog-insertion-flag>).
Introduced in v9.10.0.
Example Usage:
{% set changelog_parts = prev_changelog_contents.split(
ctx.changelog_insertion_flag, maxsplit=1
)
%}
changelog_mode(Literal["init", "update"]): the mode of changelog generation currently in use. you can use this to pick different rendering logic. The value is passed straight through from thechangelog.mode(<#config-changelog-mode>) configuration setting.
Introduced in v9.10.0.
Example Usage:
{% if ctx.changelog_mode == "init"
%}{% include ".changelog_init.md.j2"
%}{#
#}{% elif ctx.changelog_mode == "update"
%}{% include ".changelog_update.md.j2"
%}{#
#}{% endif
%}
history(ReleaseHistory): theReleaseHistory(<#semantic_release.changelog.release_history.ReleaseHistory>) instance for the project โ peek the Release History section for the deets ๐
Example Usage:
{% set unreleased_commits = ctx.history.unreleased | dictsort
%}{% for release in context.history.released.values()
%}{% include ".versioned_changes.md.j2"
#}{% endfor
%}
hvcs_type(str): the name of the VCS server type that's currently configured. Use it to figure out which filters are available, or to branch your rendering logic.
Introduced in v9.6.0.
Example Usage:
{% if ctx.hvcs_type == "github"
%}{{ "29" | pull_request_url
}}{#
#}{% elif ctx.hvcs_type == "gitlab"
%}{{ "29" | merge_request_url
}}{#
#}{% endif
%}
mask_initial_release(bool): a boolean that says whether the initial release should be masked with a generic message. Passed straight through from thechangelog.default_templates.mask_initial_release(<#config-changelog-default-templates-mask-initial-release>) configuration setting.
Introduced in v9.14.0.
Example Usage:
#}{% if releases | length == 1 and ctx.mask_initial_release
%}{# # On a first release, generate a generic message
#}{% include ".components/first_release.md.j2"
%}{% else
%}{# # Not the first release
#}{% include ".components/versioned_changes.md.j2"
%}{% endif
%}
repo_name(str): the name of the current repository, parsed from the Git url.
Example Usage:
{{ ctx.repo_name }}
example_repo
repo_owner(str): the owner of the current repository, parsed from the Git url.
Example Usage:
{{ ctx.repo_owner }}
example_org
prev_changelog_file(str): the path to the previous changelog file that should get updated with the new release info. Passed straight through fromchangelog.changelog_file(<#config-changelog-changelog-file>).
Introduced in v9.10.0.
Example Usage:
{% set prev_changelog_contents = prev_changelog_file | read_file | safe %}
๐ Release History ๐
A ReleaseHistory (<#semantic_release.changelog.release_history.ReleaseHistory>) object has two attributes: released and unreleased. that's it, that's the whole vibe ๐
The unreleased attribute is of type Dict[str, List[ParseResult]]. Every commit in the current branch's commit history since the last release on this branch gets grouped by the type attribute of the ParsedCommit (<#semantic_release.commit_parser.token.ParsedCommit>) that the commit parser returned โ or, if the parser returned a ParseError (<#semantic_release.commit_parser.token.ParseError>), the result is grouped under the "unknown" key ๐ป
Because of that: every single element of ReleaseHistory.unreleased["unknown"] is a ParseError (<#semantic_release.commit_parser.token.ParseError>), and every element of every other value in ReleaseHistory.unreleased is of type ParsedCommit (<#semantic_release.commit_parser.token.ParsedCommit>). no cap.
Typically the commit types are gonna be "feature", "fix", "breaking", though the specific types are decided by the parser. For example, the EmojiCommitParser (<#semantic_release.commit_parser.emoji.EmojiCommitParser>) uses a textual representation of the emoji that matches the most significant change introduced in a commit (like ":boom:") as the different commit types. As a template author you're totally free to customize how these get presented in the rendered template โจ
Note: if you're using a custom commit parser following the guide at Custom Parsers (<#commit-parser-custom-parser>), your custom implementations ofParseResult,ParseError(<#semantic_release.commit_parser.token.ParseError>) andParsedCommit(<#semantic_release.commit_parser.token.ParsedCommit>) will be used in place of the built-in types. ๐ซก
The released attribute is of type Dict[Version, Release]. The keys of this dictionary correspond to each version released within this branch's history, and they're of type Version (<#semantic_release.version.version.Version>). You can use the as_tag() method to render these as the Git tag they correspond to inside your template ๐ซ
A Release (<#semantic_release.changelog.release_history.Release>) object has an elements attribute, which has the same structure as the unreleased attribute of a ReleaseHistory (<#semantic_release.changelog.release_history.ReleaseHistory>); that is, elements is of type Dict[str, List[ParseResult]], where every element of elements["unknown"] is a ParseError (<#semantic_release.commit_parser.token.ParseError>), and elements of every other value correspond to the type attribute of the ParsedCommit (<#semantic_release.commit_parser.token.ParsedCommit>) returned by the commit parser.
The commits represented inside each ReleaseHistory.released[version].elements grouping are the commits that were made between version and the release corresponding to the previous version. So like, given two releases Version(1, 0, 0) and Version(1, 1, 0), ReleaseHistory.released[Version(1, 0, 0)].elements contains only commits made after the release of Version(1, 0, 0) up to and including the release of Version(1, 1, 0) ๐ฆ
To keep a consistent order of subsections in the changelog headed by the commit type, it's recommended to use Jinja's dictsort (<https://jinja.palletsprojects.com/en/3.1.x/templates/#jinja-filters.dictsort>) filter.
Every Release (<#semantic_release.changelog.release_history.Release>) object also has these attributes:
tagger:git.Actor: the tagger who tagged the release.committer:git.Actor: the committer who made the release commit.tagged_date:datetime: the date and time the release was tagged at.
See also:
- Built-in Commit Parsers (
<#commit-parser-builtin>) - Commit Parser Tokens (
<#commit-parser-tokens>) git.Actor(<https://gitpython.readthedocs.io/en/stable/reference.html#git.objects.util.Actor>)datetime.strftimeFormat Codes (<https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes>)
๐ง Changelog Template Filters ๐ง
On top of the context variables, PSR seeds the template environment with a set of custom functions (usually called filters in Jinja (<https://jinja.palletsprojects.com/en/3.1.x/>) terminology) for you to use inside the template. A filter's first argument is always piped (|) into the function, while any extra arguments get passed in parentheses like normal function calls ๐
The filters provided vary based on the VCS you've configured and what features are available:
autofit_text_width(Callable[[textStr, maxWidthInt, indent_sizeInt], textStr]): given a text string, fit the text to the max width you provide. This filter is the moment when you wanna wrap text to a specific width. It'll try to break the text at word boundaries and will indent the text by however much you put in theindent_sizeparameter ๐
Introduced in v9.12.0.
Example Usage:
{{ "This is a long string that needs to be wrapped to a specific width" | autofit_text_width(40, 4) }}
Markdown Output:
This is a long string that needs to be
wrapped to a specific width
convert_md_to_rst(Callable[[MdStr], RstStr]): given a markdown string, convert it to reStructuredText format. This filter is perfect when you're building a reStructuredText changelog but your commit messages are in markdown format. It's used by the default RST changelog template. It's a lil limited in its ability to convert all markdown to reStructuredText, but it handles most common cases (bold, italics, inline-raw, etc.) within commit messages ๐
Introduced in v9.11.0.
Example Usage:
{{ "\n* %s (`%s`_)\n" | format(
commit.message.rstrip() | convert_md_to_rst,
commit.short_hash,
)
}}
create_pypi_url(package_name: str, version: str = ""): given a package name and an optional version, return a URL to the PyPI page for that package. If you pass a version, the URL points to that specific version page. If you don't, the URL points to the package page ๐
Introduced in v9.18.0.
Example Usage:
{{ "example-package" | create_pypi_url }}
{{ "example-package" | create_pypi_url("1.0.0") }}
Markdown Output:
https://pypi.org/project/example-package
https://pypi.org/project/example-package/1.0.0
create_release_url(Callable[[TagStr], UrlStr]): given a tag, return a URL to the release page on the remote vcs. This filter is useful when you want to link to the release page on the remote vcs.
Introduced in v9.18.0. ๐
Example Usage:
{{ "v1.0.0" | create_release_url }}
Markdown Output:
https://example.com/example/repo/releases/tag/v1.0.0
create_server_url( Callable[[PathStr, AuthStr | None, QueryStr | None, FragmentStr | None], UrlStr] ) โ bestie, you hand it a path and it slaps the configured vcs server host and url scheme right on the front. And if you want extra, you can also hand it an auth string, a query string, or a url fragment and it'll normalize those into the url it gives back. The parameter order goes exactly like we just listed, in that order, respectively. ๐
Introduced in v9.6.0.
Example Usage:
{{ "example/repo.git" | create_server_url }}
{{ "example/repo" | create_server_url(None, "results=1", "section-header") }}
Markdown Output:
https://example.com/example/repo.git
https://example.com/example/repo?results=1#section-header
create_repo_url( Callable[[RepoPathStr, QueryStr | None, FragmentStr | None], UrlStr] ) โ give it a repo path and it prepends the configured vcs server host and the repo namespace. Want more? You can optionally pass an extra query string and/or a url fragment and it'll put those in the url too. Same deal with the parameter order โ as described above, respectively. โจ It's givingcreate_server_url's cooler sibling, lowkey, because it pulls in the repo namespace and owner for you automatically. ๐ซถ
Introduced in v9.6.0.
Example Usage:
{{ "releases/tags/v1.0.0" | create_repo_url }}
{{ "issues" | create_repo_url("q=is%3Aissue+is%3Aclosed") }}
Markdown Output:
https://example.com/example/repo/releases/tags/v1.0.0
https://example.com/example/repo/issues?q=is%3Aissue+is%3Aclosed
commit_hash_url( Callable[[hashStr], UrlStr] ) โ you pass in a commit hash, it hands you back a URL to that commit on the remote. No cap, that's the whole thing. ๐
Introduced in v8.0.0.
Example Usage:
{{ commit.hexsha | commit_hash_url }}
Markdown Output:
https://example.com/example/repo/commit/a1b2c3d435657f5d339ba10c7b1ed81b460af51d
compare_url( Callable[[StartRefStr, StopRefStr], UrlStr] ) โ give it a starting git reference and an ending git reference and it builds a comparison url between those two references, one you can literally just open on the remote. ๐
Introduced in v9.6.0.
Example Usage:
{{ "v1.0.0" | compare_url("v1.1.0") }}
Markdown Output:
https://example.com/example/repo/compare/v1.0.0...v1.1.0
issue_url( Callable[[IssueNumStr | IssueNumInt], UrlStr] ) โ hand it an issue number and it returns a URL to that issue on the remote vcs. Heads up though: in v9.12.2 this filter got updated so it can handle a string with leading prefix symbols (ex.#32) and it will strip that prefix off before generating the URL. Considerate queen behavior honestly. ๐
Introduced in v9.6.0, Modified in v9.12.2.
Example Usage:
{# Add Links to issues annotated in the commit message
# NOTE: commit.linked_issues is only available in v9.15.0 or greater
#
#}{% for issue_ref in commit.linked_issues
%}{{ "- [%s](%s)" | format(issue_ref, issue_ref | issue_url)
}}{% endfor
%}
Markdown Output:
- [#32](https://example.com/example/repo/issues/32)
merge_request_url( Callable[[MergeReqStr | MergeReqInt], UrlStr] ) โ give it a merge request number and boom, URL to that merge request on the remote. This one is an alias to thepull_request_url, but it's only available for the VCS that actually uses the merge request terminology, iykyk. And in v9.12.2 this filter got updated to handle strings with leading prefix symbols (ex.#29) โ it strips the prefix before generating the URL. โจ
Introduced in v9.6.0, Modified in v9.12.2.
Example Usage:
{{
"[%s](%s)" | format(
commit.linked_merge_request,
commit.linked_merge_request | merge_request_url
)
}}
{# commit.linked_merge_request is only available in v9.13.0 or greater #}
Markdown Output:
[#29](https://example.com/example/repo/-/merge_requests/29)
pull_request_url( Callable[[PullReqStr | PullReqInt], UrlStr] ) โ pass it a pull request number and it returns a URL to that pull request on the remote. For remote vcs' that use merge request terminology, this filter is literally an alias to themerge_request_urlfilter function. And yes, in v9.12.2 it got updated to handle strings with leading prefix symbols (ex.#29) โ prefix gets stripped before the URL is generated. ๐
Introduced in v9.6.0, Modified in v9.12.2.
Example Usage:
{# Create a link to the merge request associated with the commit
# NOTE: commit.linked_merge_request is only available in v9.13.0 or greater
#}{{
"[%s](%s)" | format(
commit.linked_merge_request,
commit.linked_merge_request | pull_request_url
)
}}
Markdown Output:
[#29](https://example.com/example/repo/pull/29)
format_w_official_vcs_name( Callable[[str], str] ) โ bestie, you give it a format string and it inserts the official VCS type name into that string and returns it. This filter is so handy when you wanna show off the proper name of the VCS type in a changelog or release notes. It supports three different replace formats:%s,{}, and{vcs_name}. Periodt. ๐
Introduced in v9.18.0.
Example Usage:
{{ "%s Releases" | format_w_official_vcs_name }}
{{ "{} Releases" | format_w_official_vcs_name }}
{{ "{vcs_name} Releases" | format_w_official_vcs_name }}
Markdown Output:
GitHub Releases
GitHub Releases
GitHub Releases
read_file( Callable[[str], str] ) โ hand it a file path, it reads the file and gives you back the contents as a string. This function was added for a very specific reason: to enable the changelog update feature, where it loads the existing changelog file into the templating environment so it can be updated. ๐
Introduced in v9.10.0.
Example Usage:
{% set prev_changelog_contents = prev_changelog_file | read_file | safe %}
sort_numerically( Callable[[Iterable[str], bool], list[str]] ) โ give it a sequence of strings that maybe have some non-number characters as a prefix or suffix, and it sorts them as if they were purely numbers, lowest to highest. Obsessed, honestly. ๐ฅ This filter is the moment when you wanna sort issue numbers or other strings with a numeric component that you cannot just cast to a number directly to sort them. And if you want them in reverse order? Just pass a boolean value ofTrueas the second argument. Easy. ๐ฆ
Introduced in v9.16.0.
Example Usage:
{{ ["#222", "#1023", "#444"] | sort_numerically }}
{{ ["#222", "#1023", "#444"] | sort_numerically(True) }}
Markdown Output:
['#222', '#444', '#1023']
['#1023', '#444', '#222']
okay so not every filter slays on every platform ๐ the availability of the documented filters is literally right here, bestie โ check your hosting provider's column before you get attached:
autofit_text_widthโ bitbucket โ , gitea โ , github โ , gitlab โconvert_md_to_rstโ bitbucket โ , gitea โ , github โ , gitlab โcreate_pypi_urlโ bitbucket โ , gitea โ , github โ , gitlab โcreate_server_urlโ bitbucket โ , gitea โ , github โ , gitlab โcreate_release_urlโ bitbucket โ, gitea โ , github โ , gitlab โcreate_repo_urlโ bitbucket โ , gitea โ , github โ , gitlab โcommit_hash_urlโ bitbucket โ , gitea โ , github โ , gitlab โcompare_urlโ bitbucket โ , gitea โ, github โ , gitlab โformat_w_official_vcs_nameโ bitbucket โ , gitea โ , github โ , gitlab โissue_urlโ bitbucket โ, gitea โ , github โ , gitlab โmerge_request_urlโ bitbucket โ, gitea โ, github โ, gitlab โpull_request_urlโ bitbucket โ , gitea โ , github โ , gitlab โread_fileโ bitbucket โ , gitea โ , github โ , gitlab โsort_numericallyโ bitbucket โ , gitea โ , github โ , gitlab โ
See also:
Example ๐ฆ
okay this next bit is genuinely iconic โ here's a lil template that shows you how to render a changelog in Markdown using the PSR template context, no cap.
Configuration: pyproject.toml
[tool.semantic_release.changelog]
template_dir = "templates"
Template: templates/CHANGELOG.md.j2
# CHANGELOG
{% for version, release in ctx.history.released.items()
%}{{
"## %s (%s)" | format(version.as_tag(), release.tagged_date.strftime("%Y-%m-%d"))
}}{% for type_, commits in release["elements"] if type_ != "unknown" | dictsort
%}{{
"### %s" | format(type_ | title)
}}{% for commit in commits
%}{{
"* %s ([`%s`](%s))" | format(
commit.descriptions[0] | capitalize,
commit.hexsha[:7],
commit.hexsha | commit_hash_url,
)
}}{% endfor
%}{% endfor
%}{% endfor
%}
Result: CHANGELOG.md
# CHANGELOG
## v1.1.0 (2022-01-01)
### Feature
* Added a new feature ([`a1b2c3d`](https://github.com/example/repo/commit/a1b2c3d))
## v1.0.0 (2021-12-31)
### Fix
* Resolved divide by zero error ([`e4f5g6h`](https://github.com/example/repo/commit/e4f5g6h))
lowkey important to note: this template pulls the project history straight out of the context variable, and it uses the commit_hash_url filter to cook up a URL pointing at the remote VCS for every single commit. Both of those? Injected into the template environment by PSR itself. ๐ซถ
Custom Release Notes ๐ธ
so if you wanna make your release notes look however you want, drop a hidden file called .release_notes.md.j2 at the root of your changelog.template_dir. PSR will sniff it out automatically and use it to render the release notes during the cmd-version and cmd-changelog commands. automatically detected = main character behaviour fr.
The rendering mechanism for release notes is basically the same as the one for the changelog โ there are minor differences in what context is available to the release notes template, but the template directory structure and the modularity are all maintained. โจ
Tip: when you're first starting out customizing your own release notes template, you should go look at the default template embedded inside PSR. It lives in the directory data/templates/<parser>/md within the PSR package. study the blueprint, bestie ๐
Release Notes Context ๐
All of the changelog's template context is exposed to the <https://jinja.palletsprojects.com/en/3.1.x/> Jinja template when it's rendering the release notes.
AND ALSO โ these two globals are available to the template as well:
release(Release <#semantic_release.changelog.release_history .Release>): holds metadata about the content of the release, exactly as parsed from the commit logs.- Introduced in v8.0.0.
version(Version <#semantic_release.version.version.Version>): holds metadata about the software version that's about to be released, plus its git tag.- Introduced in v8.0.0.
Example โญ
here's a template you can use to render release notes โ it's giving very much GitHub's automatically generated release notes <https://docs.github.com/en/repositories/releasing-projects-on-github/ automatically-generated-release-notes> energy:
Configuration: pyproject.toml
[tool.semantic_release.changelog]
template_dir = "templates"
Template: templates/.release_notes.md.j2
## What's Changed
{% for type_, commits in release["elements"] | dictsort
%}{%- if type_ != "unknown"
%}{{
"### %s" | format(type_ | title)
}}{% for commit in commits
%}{{
"* %s by %s in [`%s`](%s)" | format(
commit.descriptions[0] | capitalize,
commit.commit.author.name,
commit.hexsha[:7],
commit.hexsha | commit_hash_url,
)
}}{%- endfor
%}{% endif
%}{% endfor
%}
Result: <https://github.com/example/repo/releases/tag/v1.1.0>
## What's Changed
### Feature
* Added a new feature by John Doe in [`a1b2c3d`](https://github.com/example/repo/commit/a1b2c3d)
Migrating an Existing Changelog ๐
v9.10.0 or greater
migrating an existing changelog is simple with Python Semantic Release, bestie! to preserve your existing changelog, just follow these steps:
- Set the
changelog.modeto"update"in your configuration file. This makes sure only the new release info gets added to your existing changelog file. โจ - Set the
changelog.insertion_flagto a unique string. You can use the default value, or pick a string that doesn't already show up in your existing changelog file. This flag is how PSR figures out where the new release info should be inserted into your existing changelog. - Add the insertion flag to your changelog file. It must match the value you set in step 2. The insertion flag goes in the location above where you want the new release information to be inserted. ๐
Note: if you're trying to convert an existing changelog over to a new format, you'll have to do most of that conversion manually (or rebuild via init and modify) and make absolutely sure you include your insertion flag into the format of the new changelog. no shortcuts on this one ๐ญ
Prior to v9.10.0
if you've got an existing changelog you want to preserve and you're on an older version, you'll need to add the contents of the changelog file to your changelog template โ either directly, or via Jinja's include <https://jinja .palletsprojects.com/en/3.1.x/templates/#include> tag.
and if you only want the history from your next release onwards rendered into the changelog on top of the existing changelog, you can add an if statement <https://jinja.palletsprojects.com/en/3.1.x/ templates/#if> based on the versions in the keys of context.released. ๐ฆ
๐ ๏ธ Upgrading Templates
okay so PSR is a living project bestie, it keeps growing, and the templating engine keeps getting new features and glow-ups โจ If you made your own custom templates, you might need to give them a little update so they can actually enjoy those new features. Below is the rundown on how to upgrade your templates and unlock the new stuff. ๐
๐ Incrementally Updating Changelog Template
Note: this whole section only matters if you're upgrading from a version of PSR greater thanv8.0.0and prior tov9.10.0and you made your own custom templates. iykyk ๐ซถ
So if you already made your own custom templates and you want in on the new updating-changelog feature, you're gonna need to tweak your existing templates a lil bit. No biggie.
These steps are just suggestions to help you upgrade, but honestly? The main character move is to go review the embedded default templates in the PSR package for the full example. You can find the default templates in the data/templates/ directory (https://github.com/python-semantic-release/python-semantic-release/tree/master/src/semantic_release/data/templates). ๐
- Add a conditional to check the
changelog_mode. This lets you figure out whether you should render the entire changelog or just the new release info. Seedata/templates/*/md/CHANGELOG.md.j2for reference. - Use the new
read_filefilter to read in the existing changelog filectx.prev_changelog_file. This lets you include the existing changelog content in your new changelog file. Seedata/templates/*/md/.components/changelog_update.md.j2for reference. - Split the changelog content based on the insertion flag. This lets you insert the new release information after the insertion flag (
ctx.changelog_insertion_flag). Seedata/templates/*/md/.components/changelog_update.md.j2for reference. - Print the leading content before the insertion flag. This keeps any content that should come before the new release info. See
data/templates/*/md/.components/changelog_update.md.j2for reference. - Print your insertion flag. This one is imperative, bestie ๐จ โ it's what makes sure the resulting changelog can be updated again in the future. See
data/templates/*/md/.components/changelog_update.md.j2for reference. - Print the new release information. Be sure to consider both unreleased and released commits here, because of the
cmd-changelogcommand that can be run at any time. Seedata/templates/*/md/.components/changelog_update.md.j2for reference. - Print the trailing content after the insertion flag. This keeps any content that should come after the new release info. See
data/templates/*/md/.components/changelog_update.md.j2for reference.
Tip: modularity of your templates is key to handling both modes of changelog generation. Go reference the default templates for examples on how both modes are handled and how they defensively handle a whole bunch of breaking scenarios. ๐
Tip: if you're having trouble upgrading your templates, just post a question on the PSR GitHub <https://github.com/python-semantic-release/python-semantic-release/issues> โ the community got you ๐ซถ
๐ฟ Multibranch Releases
Python Semantic Release supports releases from multiple branches within your Git repository. You can elect to have a branch or set of branches create releases or prereleases (https://semver.org/#spec-item-9) โ your call, bestie. There are no restrictions enforced on how you set up your releases, but be aware: if you create new releases from multiple branches, or prereleases from multiple independent branches using the same prerelease token, there's a chance Python Semantic Release will calculate the next version to be the same on more than one branch โ which leads to an error that a Git tag already exists. ๐ญ
Note: a "prerelease token" is the string used to suffix onto the 3-digit form of a full semantic version. For example, in the version1.2.3-beta.1, the prerelease token is"beta". Typical strings used for pre-release tokens include"alpha","beta","dev"and"rc". These tend to indicate a level of maturity of the software associated with the version, but the specific meaning of each string is up to the project to decide. Generally, it's good practice to maintain a single branch from which full releases are made, and one branch at a time for each type of prerelease (alpha,beta,rc, etc).
If you absolutely require tagging and (pre-)releases to take place from multiple branches where there's a risk that tags could conflict between branches, you can use the --build-metadata command line argument to attach additional information (such as the branch name) to the tag, so it's uniquely distinguished from any other tags that might be calculated against other branches. Such a situation may occur in the following scenario:
O ----------- O <---- feature-1
/ "feat: abc"
/
O -------- O --------------- O <---- main
v1.0.0 v1.1.0
\
O ----------- O <---- feature-2
"feat: 123"
Suppose that Python Semantic Release has been configured to use the same prerelease token "alpha" for all feature-* branches, and the default tag format "v{version}". In this case, running a pre-release from branch feature-1 will recognize that since the last release, 1.1.0, a feature has been introduced and therefore the next tag to be applied to feature-1 will be v1.2.0-alpha.1.
However, suppose we then try to run a release against feature-2. This will also recognize that a feature has been introduced against the last released version of v1.1.0 and therefore will try to create the tag v1.2.0-alpha.1, leading to an error as this tag was already created against feature-1. ๐
To get around this issue, you can pass the branch name as part of the build metadata:
semantic-release version --build-metadata $(git branch --show-current)
This would lead to the tag v1.2.0-alpha.1+feature-1 and v1.2.0-alpha.1+feature-2 being applied to branches feature-1 and feature-2, respectively. Note that "build metadata MUST be ignored" (https://semver.org/#spec-item-10) per the semver specification when comparing two versions, so these two prereleases would be considered equivalent semantic versions โ but when merged to the branch configured to produce full releases (main), if released separately the changes from each branch would be released in two versions that would be considered different according to the semver specification. ๐ฆ
Note: if you have tags in your Git repository that are not valid semantic versions (which have then been formatted into your tag_format), these tags will be ignored for the purposes of calculating the next version.
โ๏ธ Configuring Multibranch Releases
Within your configuration file, you can create one or more groups of branches ("release groups") that produce a certain type of release. Options are configured at the group level, and the group to use is chosen based on the current branch name against which Python Semantic Release is running. ๐
Each release group is configured as a nested mapping under the tool.semantic_release.branches key in pyproject.toml, or the equivalent structure in other formats. The mapping requires a single key that is used as a name for the release group โ which can help to identify it in log messages but has no effect on the behavior of the release. For example, Python Semantic Release has only one release group by default, with the name main. ๐
Inside each release group, these key-value pairs can be set:
matchโ required: Yes, default: N/A. It's a Python regular expression (theremodule, docs at<https://docs.python.org/3/library/re.html>) that gets matched against the name of your active branch. If the branch name matches the regex you gave, that release group gets picked to supply all the other configuration settings available. ๐prereleaseโ required: No, default:false. Whether or not branches in this release group should make a prerelease instead of a full release.prerelease_tokenโ required: No, default:rc. If you're creating a prerelease, this is the string used as the prerelease token in any new versions created against this branch.
โ ๏ธ WARNING โ ๏ธ If two release groups have overlapping match patterns โ meaning the name of a branch could theoretically match both patterns โ then the release group defined first in your config file is the one that gets used. Bestie, this is not a drill. Because of that, it's recommended you put release groups with more specific match patterns higher up in your config file than the ones with patterns that would match a broader range of branch names. Order matters, iykyk. ๐ซถ
For example, suppose a project currently on version 1.22.4 is working on a new major version. The project wants to create a branch called 2.x.x against which they will develop the new major version, and they would like to create "release candidate" ("rc") prereleases from this branch. There are also a number of new features to integrate, and the project has agreed that all such branches should be named according to the convention next-{developer initials}-{issue number}, leading to branches named similarly to next-bc-prj-123. The project would like to release with tags that include some way to identify the branch and date on which the release was made from the tag.
This project would be able to leverage the following configuration to achieve the above requirements from their release configuration:
[tool.semantic_release.branches.main]
match = "(main|master)"
prerelease = false
[tool.semantic_release.branches."2.x.x"]
match = "2.x.x"
prerelease = true
prerelease_token = "rc"
[tool.semantic_release.branches."2.x.x New Features"]
match = "next-\\w+-prj-\\d+"
prerelease = true
prerelease_token = "alpha"
In a CI pipeline, the following command would allow attaching the date and branch name to the versions that are produced (note this example uses the UNIX date command):
semantic-release version \
--build-metadata "$(git branch --show-current).$(date +%Y%m%d)"
This would lead to versions such as 1.1.1+main.20221127 or 2.0.0-rc.4+2.x.x.20221201. โจ Look at those tags, they're gorgeous.
Note: Remember that is always possible to override the release rules configured by using thecmd-version-option-force-levelandcmd-version-option-as-prereleaseflags. You always get a say, bestie. ๐
๐ Strict Mode
Strict Mode is enabled by use of the strict parameter to the main command for Python Semantic Release. Strict Mode alters the behavior of Python Semantic Release when certain conditions are encountered that prevent Python Semantic Release from performing an action. Typically, this will result in a warning becoming an error, or a different exit code (0 vs non-zero) being produced when Python Semantic Release exits early.
For example:
#!/usr/bin/bash
set -euo pipefail
git checkout $NOT_A_RELEASE_BRANCH
pip install \
black \
isort \
twine \
pytest \
python-semantic-release
isort . # sort imports
black . # format the code
pytest # test the code
semantic-release --strict version # ERROR - not a release branch
twine upload dist/* # publish the code
Using Strict Mode with the --strict flag ensures this simple pipeline will fail while running semantic-release, as the non-zero exit code will cause it to stop when combined with the -e option.
Without Strict Mode, the semantic-release command will exit with code 0, causing the above pipeline to continue. ๐ญ (the pipeline continues, the vibes do not)
The specific effects of enabling Strict Mode are detailed below.
๐ซ Non-Release Branches
When running in Strict Mode, invoking Python Semantic Release on a non-Release branch will cause an error with a non-zero exit code. This means that you can prevent an automated script from running further against branches you do not want to release from, for example in multibranch CI pipelines.
Running without Strict Mode will allow subsequent steps in the pipeline to also execute, but be aware that certain actions that Python Semantic Release may perform for you will likely not have been carried out, such as writing to files or creating a git commit in your repository. ๐
See also:
- Multibranch Releases
<#multibranch-releases>
๐ Version Already Released/No Release To Be Made
When Strict Mode is not enabled and Python Semantic Release identifies that no release needs to be made, it will exit with code 0. You can cause Python Semantic Release to raise an error if no release needs to be made by enabling Strict Mode.
๐ Configuration
Python Semantic Release is highly configurable, allowing you to tailor it to your project's needs. It supports various runtime environments and can be integrated with different CI/CD services.
- Check out our set of configuration guides
<#config-guides>to help walk you through the set up of common project customizations. - Dive in deep and explore the full set of possible customization options
<#config>. - Go Automatic and Configure your CI/CD services
<#automatic>to use Python Semantic Release.
๐ Configuration Guides
This section provides detailed guides on how to configure PSR for various use cases and integrations. It is recommended to complete the Getting Started Guide <#getting-started-guide> first before diving into these more specific configurations. Fr fr, do the basics first, it makes everything else hit different. ๐
๐ข Releasing Packages from a Monorepo
A monorepo (mono-repository) is a software development strategy where code for multiple projects is stored in a single source control system. This approach streamlines and consolidates configuration, but introduces complexities when using automated tools like Python Semantic Release (PSR).
Previously, PSR offered limited compatibility with monorepos. As of v10.4.0, PSR introduces the Conventional Commits Monorepo Parser <#commit-parser-builtin-conventional-monorepo>, designed specifically for monorepo environments. To fully leverage this new parser, you must configure your monorepo as described below. โจ
๐ ๏ธ Configuring PSR
๐ Example: Simple
Directory Structure: PSR does not yet support a single, workspace-level configuration definition. This means each package in the monorepo requires its own PSR configuration file. A compatible and common monorepo file structure looks like:
project/
โโโ .git/
โโโ .venv/
โโโ packages/
โ โโโ pkg1/
โ โ โโโ docs/
โ โ โ โโโ source/
โ โ โ โโโ conf.py
โ โ โ โโโ index.rst
โ โ โ
โ โ โโโ src/
โ โ โ โโโ pkg1/
โ โ โ โโโ __init__.py
โ โ โ โโโ __main__.py
โ โ โ โโโ py.typed
โ โ โ
โ โ โโโ CHANGELOG.md
โ โ โโโ README.md
โ โ โโโ pyproject.toml <-- PSR Configuration for Package 1
โ โ
โ โโโ pkg2/
โ โโโ docs/
โ โ โโโ source/
โ โ โโโ conf.py
โ โ โโโ index.rst
โ โโโ src/
โ โ โโโ pkg2/
โ โ โโโ __init__.py
โ โ โโโ __main__.py
โ โ โโโ py.typed
โ โ
โ โโโ CHANGELOG.md
โ โโโ README.md
โ โโโ pyproject.toml <-- PSR Configuration for Package 2
โ
โโโ .gitignore
โโโ README.md
Okay so this is the most bare-bones monorepo setup ever โ every package is fully self-contained with its own config files, its own docs, its own CHANGELOG files, like each one said "I'm my own girl ๐
". To release a package you just cd into the package directory and run PSR's cmd-version. PSR will automatically read that package's pyproject.toml, hunting for the [tool.semantic_release] section to figure out the package's versioning and release config, and then it walks up the file tree to find the Git repository. ๐ฆ
And because there's no workspace-level config at all, you have to duplicate any shared PSR config into every single package's config file. ๐ญ Yes, bestie, copy-paste core. Then you customize each one per package so PSR knows how to tell the commits apart.
With the file structure above, here's an example config file for each package:
# FILE: pkg1/pyproject.toml
[project]
name = "pkg1"
version = "1.0.0"
[tool.semantic_release]
commit_parser = "conventional-monorepo"
commit_message = """\
chore(release): pkg1@{version}`
Automatically generated by python-semantic-release
"""
tag_format = "pkg1-v{version}"
version_toml = ["pyproject.toml:project.version"]
[tool.semantic_release.commit_parser_options]
path_filters = ["."]
scope_prefix = "pkg1-"
# FILE: pkg2/pyproject.toml
[project]
name = "pkg2"
version = "1.0.0"
[tool.semantic_release]
commit_parser = "conventional-monorepo"
commit_message = """\
chore(release): pkg2@{version}`
Automatically generated by python-semantic-release
"""
tag_format = "pkg2-v{version}"
version_toml = ["pyproject.toml:project.version"]
[tool.semantic_release.commit_parser_options]
path_filters = ["."]
scope_prefix = "pkg2-"
These are the bare minimum config options each package needs. Notice how tag_format <#config-tag-format> is doing the heavy lifting to keep tags from different packages from colliding โ iconic. The commit parser options are specific to the new Conventional Commits Monorepo Parser <#commit-parser-builtin-conventional-monorepo> and they're huge for figuring out which commits actually belong to which package. And since you're expected to cd into each package before releasing, the file paths in each config file should be relative to the package directory, not the repo root. ๐
Each package also defines a slightly different commit_message <#config-commit-message> so the package name shows up in the message. Which helps you tell which release number got bumped in the commit history. Thank you for your service, commit message. ๐ซถ
Release Steps
Say you've got this Git history in a monorepo using a GitHub Flow branching strategy (no CI/CD in the mix): [image]
To release both packages by hand, run:
cd packages/pkg1
semantic-release version
# 1.0.1 (tag: pkg1-v1.0.1)
cd ../pkg2
semantic-release version
# 1.1.0 (tag: pkg2-v1.1.0)
After releasing both packages, the Git history ends up looking like this: [image]
See also:
GitHub Actions with Monorepos <#gh-actions-monorepo>
Considerations
- Custom Changelogs: managing changelogs can get messy depending on where you want the changelog files to live. In this simple example, the changelog sits inside each package directory, and the changelog template has zero package-specific formatting or naming convention. You can use one shared template directory at the root of the project and point each package at it. ๐
# FILE: pkg1/pyproject.toml
[tool.semantic_release]
template_dir = "../../config/release-templates"
# FILE: pkg2/pyproject.toml
[tool.semantic_release]
template_dir = "../../config/release-templates"
project/
โโโ .git/
โโโ config/
โ โโโ release-templates/
โ โโโ CHANGELOG.md.j2
โ โโโ .release_notes.md.j2
โโโ packages/
โ โโโ pkg1/
โ โ โโโ CHANGELOG.md
โ โ โโโ pyproject.toml
โ โ
โ โโโ pkg2/
โ โโโ CHANGELOG.md
โ โโโ pyproject.toml
โ
โโโ .gitignore
โโโ README.md
See also:
- For situations with more complex documentation needs, see our Advanced Example.
- Package Prereleases: prereleases are totally possible, but please use package-prefixed branch names so packages don't collide with each other. ๐ง For example, to turn on alpha prereleases for new features in both packages, use this config:
# FILE: pkg1/pyproject.toml
[tool.semantic_release.branches.alpha-release]
match = "^pkg1/feat/.+" # <-- note pkg1 prefix
prerelease = true
prerelease_token = "alpha"
# FILE: pkg2/pyproject.toml
[tool.semantic_release.branches.alpha-release]
match = "^pkg2/feat/.+" # <-- note pkg2 prefix
prerelease = true
prerelease_token = "alpha"
----
Example: Advanced
If you want to consolidate documentation into one single top-level directory, the setup gets more complex. In this example there's a common documentation folder at the top level, and each package gets its own subfolder inside that documentation folder. Group project energy. ๐
And because of naming conventions, PSR cannot pull this off automatically with its default changelog templates. So for this scenario you have to copy the internal PSR templates into a custom directory (even if you don't change them at all ๐ญ) and add custom scripting to prep each release.
The directory structure looks like this:
project/
โโโ .git/
โโโ docs/
โ โโโ source/
โ โ โโโ pkg1/
โ โ โ โโโ changelog.md
โ โ โ โโโ README.md
โ โ โโโ pkg2/
โ โ โ โโโ changelog.md
โ โ โ โโโ README.md
โ โ โโโ index.rst
โ โ
โ โโโ templates/
โ โโโ .base_changelog_template/
โ โ โโโ components/
โ โ โ โโโ changelog_header.md.j2
โ โ โ โโโ changelog_init.md.j2
โ โ โ โโโ changelog_update.md.j2
โ โ โ โโโ changes.md.j2
โ โ โ โโโ first_release.md.j2
โ โ โ โโโ macros.md.j2
โ โ โ โโโ unreleased_changes.md.j2
โ โ โ โโโ versioned_changes.md.j2
โ โ โโโ changelog.md.j2
โ โโโ .gitignore
โ โโโ .release_notes.md.j2
โ
โโโ packages/
โ โโโ pkg1/
โ โ โโโ src/
โ โ โ โโโ pkg1/
โ โ โ โโโ __init__.py
โ โ โ โโโ __main__.py
โ โ โโโ pyproject.toml
โ โ
โ โโโ pkg2/
โ โโโ src/
โ โ โโโ pkg2/
โ โ โโโ __init__.py
โ โ โโโ __main__.py
โ โโโ pyproject.toml
โ
โโโ scripts/
โโโ release-pkg1.sh
โโโ release-pkg2.sh
Each package should point at the docs/templates/ directory so it uses the common release notes template. And here's the cute part: PSR ignores hidden files and directories when it's searching for template files to create, which means you can hide your shared templates in that directory for use in your release setup script. โจ Sneaky. Clever. Love it.
Here's our config file for package 1 (package 2 is defined in basically the same way):
# FILE: pkg1/pyproject.toml
[project]
name = "pkg1"
version = "1.0.0"
[tool.semantic_release]
commit_parser = "conventional-monorepo"
commit_message = """\
chore(release): Release `pkg1@{version}`
Automatically generated by python-semantic-release
"""
tag_format = "pkg1-v{version}"
version_toml = ["pyproject.toml:project.version"]
[tool.semantic_release.commit_parser_options]
path_filters = [
".",
"../../../docs/source/pkg1/**",
]
scope_prefix = "pkg1-"
[tool.semantic_release.changelog]
template_dir = "../../../docs/templates"
mode = "update"
exclude_commit_patterns = [
'''^chore(?:\([^)]*?\))?: .+''',
'''^ci(?:\([^)]*?\))?: .+''',
'''^refactor(?:\([^)]*?\))?: .+''',
'''^style(?:\([^)]*?\))?: .+''',
'''^test(?:\([^)]*?\))?: .+''',
'''^Initial [Cc]ommit''',
]
[tool.semantic_release.changelog.default_templates]
# To enable update mode: this value must set here because the default is not the
# same as the default in the other package & must be the final destination filename
# for the changelog relative to this file
changelog_file = "../../../docs/source/pkg1/changelog.md"
Note: in this config we added path filters for extra documentation files that belong to the package, so the changelog picks up documentation changes too. ๐
Next up: you're gonna want a release script that sets up your common changelog templates in the right directory format, so PSR actually creates the files where they belong. ๐
Per the Custom Changelogs reference (the template rendering bit), you have to define the folder structure from the root of the project inside the templates directory โ that's how PSR knows how to lay the files down across the repo. The script wipes any old templates, makes the directories it needs on the fly, and copies the shared templates into a package-named directory. Then bestie, you're ready to run PSR for a pkg1 release. ๐
#!/bin/bash
# FILE: scripts/release-pkg1.sh
set -euo pipefail
PROJECT_ROOT="$(dirname "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")")"
VIRTUAL_ENV="$PROJECT_ROOT/.venv"
PACKAGE_NAME="pkg1"
cd "$PROJECT_ROOT" || exit 1
# Setup documentation template
pushd "docs/templates" >/dev/null || exit 1
rm -rf docs/
mkdir -p "docs/source/"
cp -r .base_changelog_template/ "docs/source/$PACKAGE_NAME"
popd >/dev/null || exit 1
# Release the package
pushd "packages/$PACKAGE_NAME" >/dev/null || exit 1
printf '%s\n' "Releasing $PACKAGE_NAME..."
"$VIRTUAL_ENV/bin/semantic-release" -v version --no-push
popd >/dev/null || exit 1
And that's literally it! This whole example is showing you how to set up a monorepo with shared changelog templates and a consolidated documentation folder for multiple packages. Iconic. ๐
See also:
- Advanced Example Monorepo:
codejedi365/psr-monorepo-poweralpha<https://github.com/codejedi365/psr-monorepo-poweralpha>
๐ฆ Ultraviolet (uv) Integration ๐ฆ
uv <https://docs.astral.sh/uv/> is an extremely fast Python package and project manager โ it's giving modern alternative to pip <https://pip.pypa.io/en/stable/> and venv <https://docs.python.org/3/library/venv.html>. It solves a bunch of the classic Python package management headaches, no cap, but it also brings a few little quirks you gotta keep in mind when you're rolling with Python Semantic Release.
Important: Prerequisite โ make sure you've run through the Getting Started Guide <#getting-started-guide> before you go any further with this guide. fr fr.
๐ Updating the uv.lock ๐
One of the best features of uv is that it auto-generates a lock file (uv.lock) holding the exact versions of every dependency in your project. That lock file gets generated when you run uv install, and it's what keeps your CI workflows repeatable and your dev environments consistent. ๐ซถ
So here's the tea: when you create a new release with Python Semantic Release, PSR updates the version in your project's definition file (e.g., pyproject.toml) to show the new version. Sadly, that action makes uv fail on the next run, because the lock file is now out of sync with your project's definition file. ๐ญ There are two ways to fix this, depending on your vibe:
- Add a step to your build command: modify your
semantic_release.build_command<#config-build-command> so it includes the command that updates the lock file and stages it for commit. This is commonly used with the GitHub Action <#gh-actions-psr> and other CI/CD tools when you're building the artifact at the time of release.
[tool.semantic_release]
build_command = """
uv lock --upgrade-package "$PACKAGE_NAME"
git add uv.lock
uv build
"""
The intent of the lock upgrade-package call is ONLY to update the version of your project within the lock file after PSR has updated the version in your project's definition file (e.g., pyproject.toml). When you're running PSR, you've already tested the project as-is, and you do not want to actually update the dependencies just because some new one became available. ๐
For ease of use, PSR provides the $PACKAGE_NAME environment variable โ it contains the name of your package from the project's definition file (pyproject.toml:project.name).
If you're using the PSR GitHub Action <#gh-actions-psr>, you'll need to add an installation command for uv to the build_command <#config-build-command>, because the action runs in a Docker environment that does not include uv by default. The best way to make sure the correct version of uv is installed is to define the version of uv in an optional dependency list (e.g. build). That also helps other automated tools like Dependabot or Renovate keep your uv version up to date. โจ
[project.optional-dependencies]
build = ["uv ~= 0.7.12"]
[tool.semantic_release]
build_command = """
python -m pip install -e '.[build]'
uv lock --upgrade-package "$PACKAGE_NAME"
git add uv.lock
uv build
"""
- Stamp the code first & then separately run release: if you'd rather not modify your build command, then you'll need to run the
uv lock --upgrade-package <your-package-name>command before you actually create the release. Basically you're running PSR twice: (1) once to update the version in the project's definition file, and (2) a second time to generate the release.
The intent of the uv lock --upgrade-package <your-package-name> command is ONLY to update the version of your project within the lock file after PSR has updated the version in your project's definition file (e.g., pyproject.toml). When you're running PSR, you've already tested the project as-is, and you do not want to actually update the dependencies just because a new one became available.
# 1. PSR stamps version into files (nothing else)
# don't build the changelog (especially in update mode)
semantic-release -v version --skip-build --no-commit --no-tag --no-changelog
# 2. run UV lock as pyproject.toml is updated with the next version
uv lock --upgrade-package <your-package-name>
# 3. stage the lock file to ensure it is included in the PSR commit
git add uv.lock
# 4. run PSR fully to create release
semantic-release -v version
๐ Advanced Example ๐
Obviously you can mix and match these 2 approaches however you need, bestie. If PSR's pipeline was using uv, we'd end up with a mixture of the 2 approaches, because we run the build in a separate job from the release. In our case, PSR would also need to carry the lock file along the pipeline as a workflow artifact, so that the release job can commit it. That advanced workflow would look like this:
# File: .tool-versions
uv 0.7.12
# File: .python-version
3.11.11
# File: pyproject.toml
[project.optional-dependencies]
build = ["python-semantic-release ~= 10.0"]
test = ["pytest ~= 8.0"]
[tool.semantic_release]
build_command = """
uv lock --upgrade-package "$PACKAGE_NAME"
uv build
"""
# File: .github/workflows/release.yml
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
env:
dist_artifacts_name: dist
dist_artifacts_dir: dist
lock_file_artifact: uv.lock
steps:
- name: Setup | Checkout Repository at workflow sha
uses: actions/checkout@COMMIT_HASH # vX.X.X
with:
ref: ${{ github.sha }}
- name: Setup | Force correct release branch on workflow sha
run: git checkout -B ${{ github.ref_name }}
- name: Setup | Install uv
uses: asdf-vm/actions/install@COMMIT_HASH # v4.X.X
- name: Setup | Install Python & Project dependencies
run: uv sync --extra build
- name: Build | Build next version artifacts
id: version
env:
GH_TOKEN: "none"
run: uv run semantic-release -v version --no-changelog --no-commit --no-tag
- name: Upload | Distribution Artifacts
if: ${{ steps.version.outputs.released == 'true' }}
uses: actions/upload-artifact@COMMIT_HASH # v4.X.X
with:
name: ${{ env.dist_artifacts_name }}
path: ${{ format('{0}/**', env.dist_artifacts_dir) }}
if-no-files-found: error
retention-days: 2
- name: Upload | Lock File Artifact
if: ${{ steps.version.outputs.released == 'true' }}
uses: actions/upload-artifact@COMMIT_HASH # v4.X.X
with:
name: ${{ env.lock_file_artifact }}
path: ${{ env.lock_file_artifact }}
if-no-files-found: error
retention-days: 2
outputs:
new-release-detected: ${{ steps.version.outputs.released }}
new-release-version: ${{ steps.version.outputs.version }}
new-release-tag: ${{ steps.version.outputs.tag }}
new-release-is-prerelease: ${{ steps.version.outputs.is_prerelease }}
distribution-artifacts: ${{ env.dist_artifacts_name }}
lock-file-artifact: ${{ env.lock_file_artifact }}
test-e2e:
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout Repository
uses: actions/checkout@COMMIT_HASH # vX.X.X
with:
ref: ${{ github.sha }}
fetch-depth: 1
- name: Setup | Download Distribution Artifacts
uses: actions/download-artifact@COMMIT_HASH # v4.X.X
if: ${{ needs.build.outputs.new-release-detected == 'true' }}
id: artifact-download
with:
name: ${{ needs.build.outputs.distribution-artifacts }}
path: ./dist
- name: Setup | Install uv
uses: asdf-vm/actions/install@COMMIT_HASH # v4.X.X
- name: Setup | Install Python & Project dependencies
run: uv sync --extra test
- name: Setup | Install distribution artifact
if: ${{ steps.artifact-download.outcome == 'success' }}
run: |
uv pip uninstall my-package
uv pip install dist/python_semantic_release-*.whl
- name: Test | Run pytest
run: uv run pytest -vv tests/e2e
release:
runs-on: ubuntu-latest
needs:
- build
- test-e2e
if: ${{ needs.build.outputs.new-release-detected == 'true' }}
concurrency:
group: ${{ github.workflow }}-release-${{ github.ref_name }}
cancel-in-progress: false
permissions:
contents: write
steps:
- name: Setup | Checkout Repository on Release Branch
uses: actions/checkout@COMMIT_HASH # vX.X.X
with:
ref: ${{ github.ref_name }}
- name: Setup | Force release branch to be at workflow sha
run: git reset --hard ${{ github.sha }}
- name: Setup | Install uv
uses: asdf-vm/actions/install@COMMIT_HASH # v4.X.X
- name: Setup | Install Python & Project dependencies
run: uv sync --extra build
- name: Setup | Download Build Artifacts
uses: actions/download-artifact@COMMIT_HASH # v4.X.X
id: artifact-download
with:
name: ${{ needs.build.outputs.distribution-artifacts }}
path: dist
- name: Setup | Download Lock File Artifact
uses: actions/download-artifact@COMMIT_HASH # v4.X.X
with:
name: ${{ needs.build.outputs.lock-file-artifact }}
- name: Setup | Stage Lock File for Version Commit
run: git add uv.lock
- name: Release | Create Release
id: release
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uv run semantic-release -v --strict version --skip-build
uv run semantic-release publish
outputs:
released: ${{ steps.release.outputs.released }}
new-release-version: ${{ steps.release.outputs.version }}
new-release-tag: ${{ steps.release.outputs.tag }}
deploy:
name: Deploy
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.released == 'true' && github.repository == 'python-semantic-release/my-package' }}
needs:
- build
- release
environment:
name: pypi
url: https://pypi.org/project/my-package/
permissions:
id-token: write
steps:
- name: Setup | Download Build Artifacts
uses: actions/download-artifact@COMMIT_HASH # v4.X.X
id: artifact-download
with:
name: ${{ needs.build.outputs.distribution-artifacts }}
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@COMMIT_HASH # v1.X.X
with:
packages-dir: dist
print-hash: true
verbose: true
Whew ok that was a whole YAML situation but we got through it ๐ช note that git reset --hard ${{ github.sha }} is doing the absolute most to force the release branch onto the workflow sha, and yes, uv sync --extra build is how we get the build extras in there. Obsessed with a clean release pipeline fr fr.
๐ Configuration ๐
So PSR reads its config from a file, and you point at that file with the --config option on cmd-main. Right now it speaks TOML or JSON โ pick your fighter โ and it will try to auto-detect and parse whichever one you threw at it. Versatile queen behavior โจ
Now, the details of where it lives in those files matter, so listen up bestie:
- JSON config? Python Semantic Release goes looking for its settings under a top-level
semantic_releasekey. - TOML config? It checks under the table
[tool.semantic_release]first (that's the whole convention where Python tools put their config under the top-leveltooltable in theirpyproject.toml, iykyk), and then falls back to[semantic_release]โ which is honestly nicer if you're using some file that isn't the defaultpyproject.toml.
Every example on this page is written in TOML, but there's zero restriction on using JSON instead. And if you wanna flip any example below into its JSON twin, these commands do it for you (in Bash):
export TEXT="<the TOML to convert>"
cat <<EOF | python3
import tomlkit, json
print(json.dumps(tomlkit.loads('''$TEXT'''), indent=4))
EOF
Slay, no cap. ๐
๐ธ A note on null ๐ธ
Okay so TOML literally does not have a "null" or "nil" value, and it's not planned as a language feature either โ the relevant GitHub issue is at https://github.com/toml-lang/toml/issues/30. So here's the tea: in Python Semantic Release, options that default to None get inferred from the relevant configuration settings just... not being present at all in your config. Because of that limitation, you currently can't explicitly set those settings as "null" in a TOML-format config. Technically you can do it in a JSON-format config, but honestly? Keep it consistent and just omit those settings. Periodt. ๐
๐ฆ Environment Variables ๐ฆ
Some settings are simply better pulled straight out of environment variables instead of sitting in plaintext in your config file. Python Semantic Release can be told to go look up an environment variable's value for a given setting โ but heads up, this feature is not available for all settings. To use it, you have to say in your config file the name of the environment variable you want used.
The classic, most common use case is passing auth tokens. You do NOT want to hard code your authentication token into your config file โ that's a security risk, fr fr. A plaintext token in your config could be exposed to literally anyone with access to your repo, and even long after it's deleted if that token ended up in your git history. ๐ญ So instead: define the name of the environment variable holding your remote.token, like GH_TOKEN, in your config file, and Python Semantic Release does the rest. Like this:
[semantic_release.remote.token]
env = "GH_TOKEN"
And given basic TOML syntax compatibility, that's equivalent to:
[semantic_release.remote]
token = { env = "GH_TOKEN" }
The general format for saying "yo, source this from an environment variable" is:
[semantic_release.variable]
env = "ENV_VAR"
default_env = "FALLBACK_ENV_VAR"
default = "default value"
In that structure:
envโ the environment variable that Python Semantic Release will search for.default_envโ a fallback environment variable to read in case the one specified byenvisn't set. This is optional โ if you don't specify it, no fallback is used.defaultโ a default value to use in case the environment variable specified byenvisn't set. This is optional too โ ifdefaultisn't specified, then the environment variable specified byenvis considered required.
๐ semantic_release settings ๐
The next sections lay out all the definitions and descriptions of every supported configuration setting. If there are type mis-matches, PSR will throw validation errors upon load. And if a setting isn't provided, PSR fills in the default value for you. Easy.
Python Semantic Release expects a root level key to kick off the configuration definition, so make sure you're using the right root key for the config format you've got.
Note: if you're usingpyproject.toml, this heading should include thetoolprefix as specified within PEP 517, which gives you[tool.semantic_release].
Note: if you're using areleaserc.toml, use[semantic_release]as the root key.
Note: if you're using areleaserc.json,semantic_releasemust be the root key in the top level dictionary.
๐ซ add_partial_tags ๐ซ
Type: bool
Tells PSR whether partial version tags should be handled when creating a new version. Set it to true and a major tag and a major.minor tag get created or updated, using the format specified in tag_format. And if the version has build metadata, a major.minor.patch tag also gets created or updated.
Partial version tags are disabled for pre-release versions. Just so you know ๐ซถ
Example
[semantic_release]
tag_format = "v{version}"
add_partial_tags = true
This config, with the next version of 1.2.3, results in:
git log --decorate --oneline --graph --all
# * 4d4cb0a (tag: v1.2.3, tag: v1.2, tag: v1, origin/main, main) 1.2.3
# * 3a2b1c0 fix: some bug
# * 2b1c0a9 (tag: v1.2.2) 1.2.2
# ...
And if build-metadata is used, the next version of 1.2.3+20251109 results in:
git log --decorate --oneline --graph --all
# * 4d4cb0a (tag: v1.2.3+20251109, tag: v1.2.3, tag: v1.2, tag: v1, origin/main, main) 1.2.3+20251109
# * 3a2b1c0 chore: add partial tags to PSR configuration
# * 2b1c0a9 (tag: v1.2.3+20251031) 1.2.3+20251031
# ...
Default: false
โจ allow_zero_version โจ
Introduced in v9.2.0
Type: bool
This flag controls whether Python Semantic Release will use version numbers aligning with the 0.x.x pattern.
If it's true and you're starting at 0.0.0, a minor bump sets the next version to 0.1.0, whereas a patch bump sets the next version to 0.0.1. A breaking change (i.e. a major bump) sets the next version to 1.0.0 โ unless major_on_zero is set to false.
If it's false, Python Semantic Release considers the first possible version to be 1.0.0, regardless of whether it's a patch, minor, or major change level. And bonus: when allow_zero_version is set to false, the major_on_zero setting is ignored entirely.
Default changed to false in v10.0.0
Default: false
๐ assets ๐
Type: list[str]
One or more paths to additional assets that should be committed to the remote repository, on top of any files modified by writing the new version. Extra goodies, basically.
Default: []
๐ branches ๐
This setting gets discussed in way more detail over at Multibranch Releases <#multibranch-releases>. Go read that when you're ready bestie.
Default:
[semantic_release.branches.main]
match = "(main|master)"
prerelease_token = "rc"
prerelease = false
๐ง build_command ๐ง
Type: Optional[str]
The command used to build the current project during cmd-version.
Python Semantic Release runs the build command in the OS default shell with a subset of environment variables. PSR hands you the variable NEW_VERSION in the environment, set to the value of the next determined version. The following table summarizes all the environment variables that are passed on to the build_command runtime if they exist in the parent process โ
If you wanna slide extra environment variables into your build command, bestie, go peek at build_command_env. But here's the tea on what already gets passed along for you โ nobody's making you set these by hand, okay? ๐
Here's the whole roster, no gatekeeping:
CIโ passes through astrueif it already exists in the process env; if it doesn't, it just stays unset. No inventing stuff fr.BITBUCKET_CIโtruewhen Bitbucket CI variables exist in the env, unset otherwise. Bitbucket girlies, this one's for you ๐ซถGITHUB_ACTIONSโ pass-throughtrueif it exists in the process env, unset otherwise. GitHub Actions stays winning โจGITEA_ACTIONSโ pass-throughtrueif it exists in the process env, unset otherwise.GITLAB_CIโ pass-throughtrueif it exists in the process env, unset otherwise.HOMEโ passes through theHOMEof the parent process. Home sweet home ๐NEW_VERSIONโ the semantically determined next version (ex.1.2.3). This is the moment. The main character. ๐PATHโ passes through thePATHof the parent process, so your command can actually find its little binaries.PACKAGE_NAMEโ your project name as defined inpyproject.toml:project.name. Yes, pulled straight from there, no cap.PSR_DOCKER_GITHUB_ACTIONโ pass-throughtrueif it exists in the process env, unset otherwise. Docker + GitHub Action combo meal ๐VIRTUAL_ENVโ passes throughVIRTUAL_ENVif it exists in the process env, unset otherwise. Your lil venv gets to tag along ๐
Note the pattern, bestie: a bunch of these are pass-through โ meaning if the process env already has them, they come through as true, and if it doesn't, they're just unset. The tool is not out here making stuff up for you. It only reports what's actually there ๐
In addition, on windows systems these environment variables get passed too, bestie ๐:
ALLUSERSAPPDATAโ Pass-throughALLUSERAPPDATAif exists in process env, unset otherwiseALLUSERSPROFILEโ Pass-throughALLUSERSPPPROFILEif exists in process env, unset otherwiseAPPDATAโ Pass-throughAPPDATAif exists in process env, unset otherwiseCOMMONPROGRAMFILESโ Pass-throughCOMMONPROGRAMFILESif exists in process env, unset otherwiseCOMMONPROGRAMFILES(X86)โ Pass-throughCOMMONPROGRAMFILES(X86)if exists in process env, unset otherwiseDEFAULTUSERPROFILEโ Pass-throughDEFAULTUSERPROFILEif exists in process env, unset otherwiseHOMEPATHโ Pass-throughHOMEPATHif exists in process env, unset otherwisePATHEXTโ Pass-throughPATHEXTif exists in process env, unset otherwisePROFILESFOLDERโ Pass-throughPROFILESFOLDERif exists in process env, unset otherwisePROGRAMFILESโ Pass-throughPROGRAMFILESif exists in process env, unset otherwisePROGRAMFILES(X86)โ Pass-throughPROGRAMFILES(X86)if exists in process env, unset otherwiseSYSTEMโ Pass-throughSYSTEMif exists in process env, unset otherwiseSYSTEM16โ Pass-throughSYSTEM16if exists in process env, unset otherwiseSYSTEM32โ Pass-throughSYSTEM32if exists in process env, unset otherwiseSYSTEMDRIVEโ Pass-throughSYSTEMDRIVEif exists in process env, unset otherwiseSYSTEMROOTโ Pass-throughSYSTEMROOTif exists in process env, unset otherwiseTEMPโ Pass-throughTEMPif exists in process env, unset otherwiseTMPโ Pass-throughTMPif exists in process env, unset otherwiseUSERPROFILEโ Pass-throughUSERPROFILEif exists in process env, unset otherwiseUSERSIDโ Pass-throughUSERSIDif exists in process env, unset otherwiseWINDIRโ Pass-throughWINDIRif exists in process env, unset otherwise
okay real talk ๐ซถ โ the spelling differences between the variable name and the name it's passing through (ALLUSERSAPPDATAvsALLUSERAPPDATA,ALLUSERSPROFILEvsALLUSERSPPPROFILE) are literally in the original, triple-P and all. I am not fixing them, I am not merging them, I'm just the messenger ๐ don't shoot.
Default: None (not specified)
๐ธ build_command_env ๐ธ
Introduced in v9.7.2 โจ
Type: Optional[list[str]]
List of environment variables to include or pass-through on to the build command that executes during cmd-version.
This config option lets you extend the list of environment variables from the table above in build_command. The input is a list of strings where each individual string handles a single variable definition. There are two formats accepted, and they're laid out right here:
VAR_NAMEโ Detects value from the PSR process environment, and passes value tobuild_commandprocessVAR_NAME=valueโ Sets variable name to value inside ofbuild_commandprocess
Note: Although variable name capitalization is not required, it is recommended as to be in-line with the POSIX-compliant recommendation for shell variable names. ๐
Default: None (not specified)
๐ changelog ๐
okay bestie, this section is literally the control room for how your changelog gets generated. all the config options that shape it live riiiight here ๐
๐ Note: here's where this little home lives in your config file, depending on which flavour you're using: -pyproject.toml:[tool.semantic_release.changelog]-releaserc.toml:[semantic_release.changelog]-releaserc.json:{ "semantic_release": { "changelog": {} } }
๐ซถ changelog_file
โ ๏ธ Warning: Deprecated as of v9.11.0 ๐ this setting got moved to changelog.default_templates.changelog_file because that's just a more logical place to group it. It's gonna get yeeted in a future major release, so like... migrate, bestie.
Type: str
This is the name of the changelog file that gets created. PSR creates it, or overwrites it if it was already chilling there, using the rendered default template that ships with Python Semantic Release. ๐
Depending on the file extension you give it, the changelog renders in whatever format that extension points to. As of v9.11.0, PSR gives you a default changelog template in both Markdown (.md) and reStructuredText (.rst) formats. If the extension is not recognized, the changelog renders in Markdown format instead โ unless the output_format setting is set, in which case that wins. โจ
If you're out here using the template_dir setting to supply your own custom templates, then this setting doesn't get used at all. Go check template_dir for the deets.
Default: "CHANGELOG.md"
๐ง default_templates
๐ Note: this little section holds the options that customize or modify the default changelog templates that come bundled with PSR. -pyproject.toml:[tool.semantic_release.changelog.default_templates]-releaserc.toml:[semantic_release.changelog.default_templates]-releaserc.json:{ "semantic_release": { "changelog": { "default_templates": {} } } }
โจ changelog_file
Introduced in v9.11.0.
Type: str
This is the name of the changelog file that will be created. It gets created, or overwritten if it already existed, with the rendered default template that's included with Python Semantic Release. ๐
Depending on the file extension of this setting, the changelog renders in the format that extension designates. PSR, as of v9.11.0, ships a default changelog template in both Markdown (.md) and reStructuredText (.rst) formats. If the file extension isn't recognized, the changelog renders in Markdown format instead โ unless the output_format setting is set, which takes over.
If you're using the template_dir setting to provide customized templates, this setting isn't used. See template_dir for more info.
Default: "CHANGELOG.md"
๐ธ mask_initial_release
Introduced in v9.14.0
Type: bool
This option toggles how the changelog and release note templates behave, specifically masking the release details for the very first release only. When it's set to true, the first version's release notes get masked with a generic message instead of the usual commit details. When it's set to false, the release notes generate like normal. ๐
Why tho? It's about clarity for your audience, bestie. Conceptually it does NOT make sense to have a list of changes (aka a Changelog) for the first release, because literally nothing has been published yet โ so in the eyes of your consumers, what change is there to even document? ๐ค
The message details live in the first_release.md.j2 and first_release.rst.j2 templates inside the default changelog template directory. ๐
Default changed to true in v10.0.0.
Default: true
See also:
- Using the Default Changelog (
#changelog-templates-default-changelog)
โญ output_format
Introduced in v9.10.0
Type: Literal["md", "rst"]
This one tells the default changelog template which output format to use when rendering the changelog. PSR supports both Markdown (md) and reStructuredText (rst). ๐
This setting takes precedence over the file extension of the changelog_file setting. If you omit it, the file extension of changelog_file decides the output format for you. And if that extension isn't recognized? Output format defaults to Markdown. periodt.
Default: "md"
See also:
changelog_file
๐ฆ environment
๐ Note: this section holds the options that customize the template environment used to render templates like the changelog. Most of these get passed straight into thejinja2.Environmentconstructor (https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Environment), and the full documentation for those parameters lives over there. -pyproject.toml:[tool.semantic_release.changelog.environment]-releaserc.toml:[semantic_release.changelog.environment]-releaserc.json:{ "semantic_release": { "changelog": { "environment": {} } } }
๐ autoescape
Type: Union[str, bool]
If this setting is a string, it should be given in module:attr form ๐
Python Semantic Release will attempt to dynamically import that string, and it should represent a path to a suitable callable that satisfies the following:
As of Jinja 2.4 this can also be a callable that is passed the template name and has to return true or false depending on whether autoescape should be enabled by default.
The result of that dynamic import gets passed directly into the jinja2.Environment constructor.
If this setting is a boolean instead, it gets passed directly into the jinja2.Environment constructor. ๐ซถ
Default: false
๐ธ block_start_string
Type: str
Passed directly into the jinja2.Environment constructor. no notes, it just vibes.
Default: "{%"
๐ธ block_end_string
Type: str
Passed directly into the jinja2.Environment constructor.
Default: "%}"
๐ธ comment_start_string
Type: str
Passed directly into the jinja2.Environment constructor.
Default: {#
๐ธ comment_end_string
Type: str
Passed directly into the jinja2.Environment constructor.
Default: "#}"
๐ธ extensions
Type: list[str]
Passed directly into the jinja2.Environment constructor.
Default: []
๐ธ keep_trailing_newline
Type: bool
Passed directly into the jinja2.Environment constructor.
Default: false
๐ธ line_comment_prefix
Type: Optional[str]
Passed directly into the jinja2.Environment constructor.
Default: None (not specified)
๐ธ line_statement_prefix
Type: Optional[str]
Passed directly into the jinja2.Environment constructor.
Default: None (not specified)
๐ธ lstrip_blocks
Type: bool
Passed directly into the jinja2.Environment constructor.
Default: false
๐ธ newline_sequence
Type: Literal["\n", "\r", "\r\n"]
Passed directly into the jinja2.Environment constructor.
Default: "\n"
๐ธ trim_blocks
Type: bool
Passed directly into the jinja2.Environment constructor.
Default: false
๐ธ variable_start_string
Type: str
Passed directly into the jinja2.Environment constructor.
Default: "{{"
๐ธ variable_end_string
Type: str
Passed directly into the jinja2.Environment constructor.
Default: "}}"
๐ฅ exclude_commit_patterns
Type: list[str]
Any patterns you drop in here get excluded from the commits that are available to your changelog ๐ This lets you, for example, filter out automated commits if you want them gone. Python Semantic Release also removes its own commits from the Changelog through this very mechanism โ so if you change the automated commit message that PSR uses when it makes commits, you might wanna add the old commit message pattern here too.
The patterns in this list are treated as regular expressions. no cap.
Default: []
๐ mode
Introduced in v9.10.0. Default changed to update in v10.0.0.
Type: Literal["init", "update"]
This setting is a flag that ultimately gets passed into the changelog context environment. It sets the value of context.changelog_mode to a string value of either init or update. โจ
When you use it with the provided changelog template, it decides how the changelog gets written. When mode is init, the changelog file gets written from scratch, overwriting any existing changelog file ๐ญ This is the v8 and v9 default behavior.
When mode is update, the changelog file looks for the insertion_flag value inside the changelog file (the one defined by changelog_file) and inserts the new version info at that location. ๐
If you're using a custom template directory, the context.changelog_mode value will still exist in the changelog context โ but it's up to your implementation to decide if and/or how to use it.
Default: update
See also:
- Using the Default Changelog (
#changelog-templates-default-changelog)
๐ insertion_flag
Introduced in v9.10.0
Type: str
A string that PSR uses to figure out where the shiny new version should get yeeted into your changelog file (the one you named in changelog_file) โ and this only matters when the changelog mode is set to update.
If you change this value in your config, bestie, you have to go manually update any changelog file you've already saved so it matches the new insertion flag. That's only if you're on update mode, though. In init mode the changelog file just gets overwritten like normal, no drama. ๐ซถ
Heads up: in v9.11.0 the insertion_flag default got way more dynamic, because an reStructuredText template showed up. The default now depends on your output_format setting. The default flag values are:
- Markdown (
md) โ<!-- version list --> - reStructuredText โ literally this, in all its chaotic glory:
..
version list
(i.e. .., then a newline, then four spaces, then version list ๐
)
Default: various, see above
๐ธ template_dir ๐ธ
Type: str
When files exist inside the directory you point at here, they get used as templates for the whole changelog rendering process. And get this โ regardless of whether the directory contains a changelog file, the directory you provide will be rendered and the files placed relative to the root of the project directory.
When this directory exists and it isn't empty, no default changelog template or release notes template will be used. If the directory is empty, the default changelog template steps in instead.
This option gets discussed in more detail over at Version Change Reports. ๐
Default: "templates"
๐ commit_author ๐
Type: str
The author used in commits, formatted as name <email>.
Note: if you're using the built-in GitHub Action, the default value isgithub-actions <actions@github.com>. You can change that with thegit_committer_nameandgit_committer_emailinputs.
See also:
- GitHub Actions
Default: semantic-release <semantic-release>
โจ commit_message โจ
Type: str
The commit message to use when making release commits. It can use {version} as a format key โ if you do, the version being released gets formatted right into the message. Cute, right?
If at some point in your project's lifetime you change this, you might wanna consider adding the old message pattern(s) to exclude_commit_patterns.
Default: "{version}\n\nAutomatically generated by python-semantic-release"
๐ commit_parser ๐
Type: str
Tells Python Semantic Release which commit parser to use for parsing the commits inside the Git repository.
Built-in parsers:
angularโAngularCommitParser(deprecated in v9.19.0 โ ๏ธ)conventionalโConventionalCommitParser(available in v9.19.0+)conventional-monorepoโConventionalCommitMonorepoParser(available in v10.4.0+)emojiโEmojiCommitParserscipyโScipyCommitParsertagโTagCommitParser(deprecated in v9.12.0 โ ๏ธ)
You can set any of the built-in parsers by their keyword, or you can bring your own commit parser using either the path/to/module_file.py:Class form or the module:Class form. Main character energy, honestly. ๐
For more info check out Commit Parsing.
Default: "conventional"
๐ฆ commit_parser_options ๐ฆ
Type: dict[str, Any]
This whole set of options gets passed directly to the commit parser class you named in the commit parser configuration option. Straight through, no filter.
For more information (including the defaults), see Customization.
Default: ParserOptions { ... }, where the ... depends on commit_parser.
๐ฅ logging_use_named_masks ๐ฅ
Type: bool
Do you want secrets found in logging messages replaced with named masks that tell you which secret got swapped out? Or do you just want a generic string doing the masking? This flag decides.
Default: false
๐ major_on_zero ๐
Type: bool
This flag controls whether PSR bumps the major version on a breaking change when the version looks like 0.y.z.
It defaults to true, which means breaking changes will bump that 0 major version up to 1.0.0 like you'd normally expect.
If you set it to false, major (breaking) releases will bump the minor digit of the version while the major version is still 0, instead of the major digit. That lets you keep shipping breaking changes while the major version stays at 0.
From the Semantic Versioning Specification:
Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.
When you're finally ready to release a stable version, set major_on_zero to true and run Python Semantic Release again. That'll push the major version up to 1.0.0. ๐
When allow_zero_version is set to false, this setting just gets ignored entirely.
Default: true
๐ no_git_verify ๐
Introduced in v9.8.0
Type: bool
This flag gets passed along to git when a git commit happens during cmd-version.
When true, it bypasses any git hooks set for the repository when Python Semantic Release makes a version commit. When false, the commit happens as normal. This option does absolutely nothing when there are no git hooks configured, and also nothing when the --no-commit option is passed.
Default: false
๐ publish ๐
This section defines configuration options that modify cmd-publish.
Note:pyproject.toml:[tool.semantic_release.publish]releaserc.toml:[semantic_release.publish]releaserc.json:{ "semantic_release": { "publish": {} } }
๐ dist_glob_patterns ๐
Type: list[str]
Uploads any files matching any of these globs to your VCS release. Every item in the list should be a string holding a Unix-style glob pattern.
Default: ["dist/*"]
โญ upload_to_vcs_release โญ
Type: bool
If set to true, uploads any artifacts matched by dist_glob_patterns to the release created in the remote VCS corresponding to the latest tag. Artifacts only get uploaded if release artifact uploads are actually supported by that VCS type. (Yes, this is conditional. Read the fine print, bestie. ๐)
Default: true
๐ง remote ๐ง
The remote configuration is a group of settings that configure PSR's integration with remote version control systems.
Note:pyproject.toml:[tool.semantic_release.remote]releaserc.toml:[semantic_release.remote]releaserc.json:{ "semantic_release": { "remote": {} } }
๐ธ api_domain ๐ธ
Type: Optional[str | Dict['env', str]]
The hosting domain for your remote HVCS's API, in case it's different from the domain. Generally you'd use this to point at a separate subdomain used for API calls instead of the primary domain (ex. api.github.com).
Most on-premise HVCS installations will NOT use this setting! Whether or not this value gets used depends on the HVCS configured (and your server administration) in the remote.type setting, and it's used in tandem with the remote.domain setting.
When you're using a custom remote.domain together with an HVCS remote.type that's configured with a separate domain or sub-domain for API requests, this value configures the location of API requests that PSR sends out.
Most on-premise or self-hosted HVCS environments use a path prefix to handle inbound API requests, which means this value will be ignored.
PSR already knows the expected api domains for known cloud services and their associated api domains, so you don't need to explicitly define this value for services like bitbucket.org and github.com.
Including the protocol schemes, like https://, for the API domain is optional. Secure HTTPS connections are assumed unless remote.insecure is true.
Default: None
๐ domain ๐
Type: Optional[str | Dict['env', str]]
The host domain for your HVCS server. This setting exists to support on-premise installations of HVCS providers with custom domain hosts.
If you're using the official domain of the associated remote.type, you don't need this value. PSR will use the default domain value for that remote.type when it's not specified. For example, when remote.type="github" is specified, the default domain of github.com gets used.
Including the protocol schemes, like https://, for the domain value is optional. Secure HTTPS connections are assumed unless remote.insecure is true.
This setting also supports reading from an environment variable, for ease-of-use in CI pipelines. See Environment Variable for more info. Depending on the remote.type, the default environment variable for the default domain's CI pipeline environment gets checked automatically, so you don't need this value in default environments. For example, when remote.type="gitlab" is specified, PSR will look at the CI_SERVER_URL environment variable when remote.domain isn't specified.
Default: None
See also:
remote.api_domain
๐ ignore_token_for_push ๐
Type: bool
If set to true, it ignores the authentication token when pushing changes to the remote. This is ideal, for example, if you already have SSH keys set up that you can use for pushing. ๐
Default: false
๐ insecure ๐
Introduced in v9.4.2
Type: bool
insecure is used to allow non-secure HTTP connections to your HVCS server.
If set to true, any domain value you pass will assume http:// if it isn't specified, and it'll allow it. When set to false (whether implicitly or explicitly), it forces https:// communications. No chill, all encryption. ๐
When you hand over a custom domain or api_domain as a config value, this flag is the one calling the shots on the protocol scheme those connections use. If there's no protocol scheme baked into the field value, this insecure option decides whether the connection goes out over HTTP or HTTPS. And if the field value does spell out a scheme? Then it has to match this setting, or PSR throws an error. like, no discussion. ๐ค
The whole point of this flag is to stop typos in your domain and api_domain values from lowkey sneaking an insecure connection in without you noticing โ while still letting you toggle the protection scheme off whenever you actually want to.
Default: false
name
Type: str
The name of the remote you're pushing to, used with git push -u $name <branch_name> โจ
Default: "origin"
token
Type: Optional[str | Dict['env', str]]
The environment variable you pull the authentication token for your remote VCS from. The classic faves are "GH_TOKEN", "GITLAB_TOKEN" and "GITEA_TOKEN", but bestie you can absolutely roll your own custom env var if that's your vibe. ๐
Note: by default this is a mandatory environment variable, and it has to be set before you use anything that needs auth against your remote VCS. If you're leaning on this token to get push access to the repo, it's gotta be set before you even think about pushing. If your push access comes through SSH keys instead, then you do not need to set this environment variable just to push the version increment, changelog and modified source code assets to the remote usingcmd-version. That said, you will need to disable release creation using thecmd-version-option-vcs-releaseoption (plus some other options) if you want to run Python Semantic Release without configuring the environment variable for your remote VCS auth token. no free lunch, sorry ๐
What this setting defaults to depends entirely on what you set as remote.type. Peep the deets below to see what the default token value is for each remote type:
"github"โ{ env = "GH_TOKEN" }"gitlab"โ{ env = "GITLAB_TOKEN" }"gitea"โ{ env = "GITEA_TOKEN" }"bitbucket"โ{ env = "BITBUCKET_TOKEN" }
Default: { env = "<envvar name>" }, where <envvar name> depends on remote.type as laid out above.
type
Type: Literal["bitbucket", "gitea", "github", "gitlab"]
Which remote VCS you're on. Right now Python Semantic Release holds it down for "github", "gitlab", "gitea" and "bitbucket". Not every bit of functionality is available on every remote type, but bestie we are so open to pull requests that help make this better! ๐ซถ
Default: "github"
url
Type: Optional[str | Dict['env', str]]
An override setting for specifying the remote upstream location of git push.
Not commonly used! This exists for when you want to override the derived upstream location because the place you wanna push to is different from the place you cloned the repository from.
This setting overrides the upstream location url that would normally be derived from the remote.name location of your git repository.
Default: None
repo_dir
Type: str
Tells PSR where the Git repository directory lives. It's used to figure out the repository location for all sorts of operations, like creating tags and commits. PSR will try to auto-detect the repository location by walking up the parent directories of the current working directory, but it'll emit a warning if the repo is found higher up than this value you defined.
And if there's no git repository from this location or any of its parent directories? PSR raises an error and exits. bye ๐
Default: "."
tag_format
Type: str
Sets the format for the Git tag that gets slapped onto the repo during a release invoked via cmd-version. The string is used as a template for the tag name, and it must include the {version} format key. no cap.
This format also gets used to parse tags already chillin' in the repository into semantic versions. Which means: if the tag format changes at some point in your repo's history, historic versions that no longer match this pattern will not be considered as versions. ๐ธ
The format keys, bestie:
{version}โ Mandatory: Yes โ Contents: the new semantic version number, for example1.2.3, or2.1.0-alpha.1+build.1234
Tags that don't match this format will not be treated as versions of your project. periodt.
This is critical for Monorepo projects, where the tag format is literally what defines which package a version tag belongs to. Generally, each package's tag format in the monorepo will include the package name as the prefix of the tag format. So if a package is named pkg1, the tag format would be pkg1-v{version}, and in the other package pkg2 the tag format would be pkg2-v{version}. That's how PSR works out which tags to use when determining the version for each package. iconic behaviour, honestly. ๐
Default: "v{version}"
version_toml
Type: list[str]
This config option is giving cousin-of-version_variables energy โ except it runs a TOML parser over the data structure before inserting the version. Which means you get to use dot-notation to point at the version via the TOML file's logical structure, and that's way more accurate than a pattern replace. slay. โจ
version_toml is commonly used to bump the version number in the project definition file, pyproject.toml, like in the example below.
As of v9.20.0, the version_toml option accepts a colon-separated definition with either 2 or 3 parts. The 2-part definition includes the file path and the version parameter (in dot-notation). And newly with v9.20.0, it also accepts an optional 3rd part so you can configure the format type.
Available Format Types
nf: Number format (ex.1.2.3)tf: Tag Format (ex.v1.2.3)
If you don't specify the format type, it defaults to the number format.
Example
[semantic_release]
version_toml = [
# "file:variable:[format_type]"
"pyproject.toml:tool.poetry.version", # Implied Default: Number format
"definition.toml:project.version:nf", # Number format
"definition.toml:project.release:tf", # Tag format
]
This configuration will result in the following changes:
diff a/pyproject.toml b/pyproject.toml
[tool.poetry]
- version = "0.1.0"
+ version = "0.2.0"
diff a/definition.toml b/definition.toml
[project]
name = "example"
- version = "0.1.0"
+ version = "0.1.0"
- release = "v0.1.0"
+ release = "v0.2.0"
Default: []
version_variables
Type: list[str]
The version_variables configuration option is a list of string definitions that says where the version number should be updated in the repository when a new version gets released. ๐
As of v9.20.0, the version_variables option accepts a colon-separated definition with either 2 or 3 parts. The 2-part definition includes the file path and the variable name. And newly with v9.20.0, it also accepts an optional 3rd part so you can configure the format type.
As of v10.6.0, the version_variables option also supports replacing an entire file by using an asterisk (*) as the pattern/variable name. Super handy for files that contain nothing but a version number, like those VERSION files. ๐
Available Format Types
nf: Number format (ex.1.2.3)tf: Tag Format (ex.v1.2.3)
If you don't specify the format type, it defaults to the number format.
Prior to v9.20.0, PSR only supports entries with the first 2 parts, because the tag format type wasn't available yet and it would only replace numeric version numbers.
Example
[semantic_release]
tag_format = "v{version}"
version_variables = [
# "file:variable:format_type"
"src/semantic_release/__init__.py:__version__", # Implied Default: Number format
"docs/conf.py:version:nf", # Number format for sphinx docs
"kustomization.yml:newTag:tf", # Tag format
# File replacement (entire file content is replaced with version)
"VERSION:*:nf", # Replace entire file with number format
"RELEASE:*:tf", # Replace entire file with tag format
]
First up, the __version__ variable in src/semantic_release/__init__.py gets updated with the next version using the SemVer number format (https://semver.org/).
diff a/src/semantic_release/__init__.py b/src/semantic_release/__init__.py
- __version__ = "0.1.0"
+ __version__ = "0.2.0"
Then the version variable in docs/conf.py gets swapped for the next version, using the SemVer number format, because we slapped an explicit nf on it ๐
diff a/docs/conf.py b/docs/conf.py
- version = "0.1.0"
+ version = "0.2.0"
Then the newTag variable in kustomization.yml gets updated to the next version too, but this time using the configured tag_format, because the definition had tf in it ๐
diff a/kustomization.yml b/kustomization.yml
images:
- name: repo/image
- newTag: v0.1.0
+ newTag: v0.2.0
Next up, the entire contents of the VERSION file get replaced with the next version in SemVer number format โ that's because of the * pattern plus the nf format type โจ
diff a/VERSION b/VERSION
- 0.1.0
+ 0.2.0
And finally, the whole of the RELEASE file gets replaced with the next version using the configured tag_format โ because of the * pattern and the tf format type ๐ฆ
diff a/RELEASE b/RELEASE
- v0.1.0
+ v0.2.0
How It works
Every version variable gets transformed into either a Regular Expression (when it's pattern-based replacement) or a file replacement operation (when the pattern is *) ๐ง
Pattern-Based Replacement
When you name an actual variable (so, not *), the replacement algorithm is ONLY a pattern match and replace. Periodt. It will NOT evaluate the code, and PSR will not understand any internal object structures โ meaning file:object.version will not work, bestie ๐ญ
The regular expression generated from the version_variables definition will:
- Look for the specified variable name in the file. The variable name can be wrapped in single (
') or double (") quotation marks โ but they have to match each other. - The variable name you defined via
variableand the version must be separated by an operand symbol (=,:,:=, or@). Whitespace around the symbol is optional. As of v10.0.0, a double-equals (==) operator is also supported as a valid operand symbol. As of v10.5.0, PSR can omit all operands entirely as long as there's at least one whitespace character between the variable name and the version ๐ - The value of the variable has to match a SemVer regular expression, and it can be wrapped in single (
') or double (") quotation marks โ but again, they must match. However, the quotes around the value don't have to match the quotes around the variable name. Mix and match, slay ๐ - If the format type is set to
tf, then the variable value must have the matching prefix and suffix of thetag_formatsetting wrapped around the SemVer version number.
Given how pattern-matchy this whole feature is, the Regular Expression can support most file formats โ because variable declarations across programming languages all kinda look the same. PSR specifically supports Python, YAML, and JSON, since those have been the most commonly requested formats. This configuration option will also work regardless of file extension, because it's just looking for a matching pattern string ๐
Note: This will also work for TOML, but we recommend using version_toml for TOML files, because that one actually interprets the TOML file and replaces the version number before writing the file back to disk. No cap ๐ซถ
File Replacement
When the pattern/variable name is specified as an asterisk (*), the entire file content gets replaced with the version string. This is the move for files that contain nothing but a version number โ like VERSION files, or any similar single-line version storage file ๐ธ
The file replacement operation:
- Reads the current file content if it exists (any whitespace is stripped)
- Sets or replaces the entire file content with the new version string
- Writes the new version back to the file (with only a single trailing newline)
The format type (nf or tf) decides whether the version gets written as a plain number (like 1.2.3) or with the tag_format prefix/suffix (like v1.2.3) โจ
Examples of Pattern-Based Replacement
Here's a comprehensive list (though not every variation) of examples where the versions below will be matched and replaced by the new version ๐
# Common variable declaration formats
version='1.2.3'
version = "1.2.3"
release = "v1.2.3" # if tag_format is set
# YAML
version: 1.2.3
# JSON
"version": "1.2.3"
# NPM & GitHub Actions YAML
version@1.2.3
version@v1.2.3 # if tag_format is set
# Walrus Operator
version := "1.2.3"
# Excessive whitespace
version = '1.2.3'
# Mixed Quotes
"version" = '1.2.3'
# Custom Tag Format with tag_format set (monorepos)
__release__ = "module-v1.2.3"
# requirements.txt
my-package == 1.2.3
# C-Macro style (no operand only whitespace required)
#define VERSION "1.2.3"
Important: The Regular Expression expects a version value to exist in the file that's getting replaced. It cannot be an empty string, and it can't be a non-semver compliant string either. If this is your very first time using PSR, we recommend you set the version to 0.0.0 ๐ This may become more flexible in the future, once issue #941 (https://github.com/python-semantic-release/python-semantic-release/issues/941) gets resolved ๐
Warning: If the file you're replacing (say, a JSON file) has two of the same variable name in it, this pattern match cannot tell them apart โ and it will replace both of them. That's a limitation of the pattern matching, not a bug, bestie ๐ญ
Default: []
โจ Automated Releases โจ
The whole key point of using this package is to automate your releases and stop stressing over version numbers, fr fr. There are different approaches to automatic releases and publishing with the help of this package โ you'll find them below. Using a CI is the recommended approach ๐
๐ Guides ๐
Travis CI
This guide expects that you've already activated the repository on Travis CI. If that's not the case, please refer to the Travis documentation (https://docs.travis-ci.com/) on how to do that ๐ซถ
1. Add python-semantic-release settings
See Configuration for details on how to configure Python Semantic Release. Make sure that at minimum you have set version_variables before continuing โญ
2. Add environment variables
You'll need to set up an environment variable in Travis. An easy way to do that is to go to the settings page for your package and add it there. Make sure the secret toggle is set correctly ๐
You need to set the GH_TOKEN environment variable with a personal access token for Github. It'll need either repo or public_repo scope, depending on whether the repository is private or public.
More info on how to set environment variables lives in the Travis documentation on environment variables (https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings) ๐ธ
3. Add travis configuration
The following should be added to your .travis.yml file:
after_success:
- git config --global user.name "semantic-release (via TravisCI)"
- git config --global user.email "semantic-release@travis"
- pip install python-semantic-release
- semantic-release version && semantic-release publish
The first line tells Travis that we want to run the listed tasks after a successful build. The two first lines in after_success configure git so that python-semantic-release can commit on Travis. The third installs the latest version of python-semantic-release. And the last one runs the publish command, which will publish a new version if the changes indicate that one is due ๐
4. Push some changes
You are now ready to release automatically on Travis CI on every single change to your master branch.
Happy coding! ๐
GitHub Actions
There are two official GitHub Actions for Python Semantic Release:
python-semantic-release/python-semantic-release@TAG
This is the main action that runs the version CLI command. It's used to (1) determine the next version number, (2) stamp the version number, (3) run the build command, (4) build the changelog, (5) commit the changes, (6) tag the commit, (7) publish the commit & tag, and lastly (8) create a GitHub release. For more info, review the version command documentation and see below for the Action configuration options ๐
python-semantic-release/publish-action@TAG
This action is used to execute the publish CLI command. It's used to upload files โ like distribution artifacts and other assets โ to a GitHub release ๐
Included in this documentation are some recommended examples below, in case you wanna get started quickly. These examples are not exhaustive, and you'll need to adjust them for your specific project needs โ especially if you're using a monorepo ๐
- GitHub Actions Example Workflows
- GitHub Actions with Monorepos
Note: These GitHub Actions are only simplified wrappers around the python-semantic-release CLI. Ultimately they download and install the published package from PyPI, so if you find yourself trying to do something more advanced or less common, you may need to install and use the CLI directly ๐ซถ
Python Semantic Release Action
The official Python Semantic Release GitHub Action (https://github.com/marketplace/actions/python-semantic-release) is a GitHub Docker Action (https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-docker-container-action), which means that at the beginning of the job it builds a Docker image containing the Python Semantic Release package and its dependencies. Then it runs the job step inside that Docker Container. This is done to make sure the environment is consistent across all GitHub Runners, regardless of platform. With that choice comes some limitations, though: non-configurable options like a pre-defined python version, a lack of installed build tools, and an inability to utilize caching ๐
The primary benefit of using the GitHub Action is that it's easy to set up and use for most projects. We handle a lot of the git configuration under the hood, so you don't have to do it yourself. And there are plenty of customization options available, detailed individually below โจ
Most importantly: your project's configuration file will be used as normal, because your project gets mounted into the container for the action to use ๐
action.ymlโ https://github.com/python-semantic-release/python-semantic-release/blob/master/action.yml โ bestie that's literally the code definition of the action ๐โจ
โจ Inputs โจ
okay so GitHub Action inputs?? they're how you do select configuration and hand the action all the info it needs to actually run ๐ซถ You pass them in with the with keyword inside your workflow file. Lowkey a LOT of them straight-up mirror the command line options from the version command. This section goes through every single supported input and what it's for, no skips ๐
๐ ๏ธ build
Type: Literal["true", "false"]
Override whether the action should execute the build command or not. This one is equivalent to adding the command line switch --skip-build (when it's false) to the version command. If you set it to true, no command line switch gets passed and the default behavior of version is used. slay.
Required: false
Note: If it's not set, or it's set totrue, the default behavior is defined by theversioncommand and any user configurations<#config-root>.
See also:
cmd-version-option-skip_buildoption for theversioncommand.
๐ ๏ธ build_metadata
Type: string
Explicitly set the build metadata of the version. This is equivalent to running the command:
semantic-release version --build-metadata <metadata>
Required: false
See also:
cmd-version-option-build-metadataoption for theversioncommand
๐ ๏ธ changelog
Type: Literal["true", "false"]
Override whether the action should generate a changelog or not. This option is equivalent to adding either --changelog (on true) or --no-changelog (on false) to the version command.
Required: false
Note: If it's not set, the default behavior is defined by theversioncommand and any user configurations<#config-root>.
See also:
cmd-version-option-changelogoptions for theversioncommand
๐ ๏ธ commit
Type: Literal["true", "false"]
Override whether the action should commit any changes to the local repository. And "changes" here means the version stamps, the changelog, and any other files that get modified and added to the index during the build command ๐ This option is equivalent to adding either --commit (on true) or --no-commit (on false) to the version command.
Required: false
Note: If it's not set, the default behavior is defined by theversioncommand and any user configurations<#config-root>.
See also:
cmd-version-option-commitoptions for theversioncommand
๐ ๏ธ config_file
Path to a custom semantic-release configuration file. By default, an empty string will look for the pyproject.toml file in the current directory. This is the same as passing the -c or --config parameter to semantic-release.
Required: false
Default: ""
See also:
cmd-main-option-configfor thesemantic-releasecommand
๐ ๏ธ directory
If the project is not at the root of the repository (like in monorepos, iykyk ๐ญ), you can specify a sub-directory to change into before running semantic-release.
Required: false
Default: .
๐ ๏ธ force
Type: Literal["prerelease", "patch", "minor", "major"]
Force the next version to be a specific bump type. This is equivalent to running the command:
semantic-release version --<type>
# Ex: force a patch level version bump
semantic-release version --patch
Required: false
See also:
cmd-version-option-force-leveloptions for theversioncommand
๐ ๏ธ git_committer_email
The email of the account used to commit. If you customize it, it must be associated with the provided token. periodt.
Required: false
๐ ๏ธ git_committer_name
The name of the account used to commit. If you customize it, it must be associated with the provided token. same energy as above fr fr.
Required: false
๐ ๏ธ github_token
The GitHub Token is essential for access to your GitHub repository so it can allow the push of commits & tags AND create a release. And it's not just "provide the token and vibe" โ you also need to make sure that token has the correct permissions. ๐
The token should have the following permissions: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions
id-token: writecontents: write
Required: true
๐ ๏ธ no_operation_mode
If set to true, the github action will pass the --noop parameter to semantic-release. This will cause semantic-release to run in "no operation" mode.
This is useful for testing the action without making any permanent changes to the repository. perfect for a little test run, no commitment ๐ง
Required: false
Default: false
See also:
cmd-main-option-noopoption for thesemantic-releasecommand
๐ ๏ธ prerelease
Force the version to be a prerelease version when set to true. This is equivalent to running the command:
semantic-release version --as-prerelease
Required: false
Note: If it's not set, the default behavior is defined by theversioncommand and any user configurations<#config-root>.
See also:
cmd-version-option-as-prereleaseoption for theversioncommand
๐ ๏ธ prerelease_token
Override any prerelease token in the configuration file with this value, if it is a pre-release. This will override the matching release branch configuration's prerelease_token value. And heads up ๐ if you always want it to be a prerelease then you must also set the prerelease input to true.
This option is equivalent to running the command:
semantic-release version --prerelease-token <token>
Required: false
Note: If it's not set, the default behavior is defined by theversioncommand and any user configurations<#config-root>.
See also:
cmd-version-option-prerelease-tokenoption for theversioncommand
๐ ๏ธ push
Type: Literal["true", "false"]
Override whether the action should push any commits or tags from the local repository to the remote repository. This option is equivalent to adding either --push (on true) or --no-push (on false) to the version command.
Required: false
Note: If it's not set, the default behavior is defined by theversioncommand and any user configurations<#config-root>.
See also:
cmd-version-option-pushoptions for theversioncommand
๐ ๏ธ root_options
Important: This option has been removed in v10.0.0 and newer because of a command injection vulnerability. Please update to v10.0.0 as soon as possible. See Upgrading to v10 <#upgrade-v10-root-options> for more information. bestie please upgrade, this one is genuinely not a drill ๐
Additional options for the main semantic-release command, which will come before the version subcommand.
Example
- uses: python-semantic-release/python-semantic-release@v9
with:
root_options: "-vv --noop"
This configuration would cause the command to be semantic-release -vv --noop version, which would run the version command verbosely but in no-operation mode.
Required: false
Default: -v
See also:
- Options for the
semantic-releasecommand
๐ ๏ธ ssh_public_signing_key
The public key associated with the private key used in signing a commit and tag. ๐
Required: false
๐ ๏ธ ssh_private_signing_key
The private key used to sign a commit and tag. ๐คซ keep it secret, keep it safe.
Required: false
๐ ๏ธ strict
If set to true, the github action will pass the --strict parameter to semantic-release.
See also:
cmd-main-option-strictoption for thesemantic-releasecommand
๐ ๏ธ tag
Type: Literal["true", "false"]
Override whether the action should create a version tag in the local repository. This option is equivalent to adding either --tag (on true) or --no-tag (on false) to the version command.
Required: false
Note: If it's not set, the default behavior is defined by theversioncommand and any user configurations<#config-root>.
See also:
cmd-version-option-tagoptions for theversioncommand
๐ ๏ธ vcs_release
Type: Literal["true", "false"]
Override whether the action should create a release on the VCS. This option is equivalent to adding either --vcs-release (on true) or --no-vcs-release (on false) to the version command.
Required: false
Note: If it's not set, the default behavior is defined by theversioncommand and any user configurations<#config-root>.
See also:
cmd-version-option-vcs-releaseoptions for theversioncommand
๐ ๏ธ verbosity
Set the verbosity level of the output as the number of -v's to pass to semantic-release. 0 is no extra output, 1 is info level output, 2 is debug output, and 3 is a silly amount of debug output. (three v's is giving unhinged and I respect it ๐โจ)
Required: false
Default: "1"
See also:
cmd-main-option-verbosityfor thesemantic-releasecommand
โจ Outputs โจ
The Python Semantic Release Action also provides outputs that can be used in subsequent steps of the workflow. These outputs are used to provide information about the release and any actions that were taken. ๐ซถ
๐ค commit_sha
Type: string
The commit SHA of the release if a release was made, otherwise an empty string.
Example upon release: d4c3b2a1e0f9c8b7a6e5d4c3b2a1e0f9c8b7a6e5 Example when no release was made: ""
๐ค is_prerelease
Type: Literal["true", "false"]
A boolean value indicating whether the released version is a prerelease.
๐ค link
Type: string
The URL link to the release if a release was made, otherwise an empty string.
Example upon release: https://github.com/user/repo/releases/tag/v1.2.3 Example when no release was made: ""
๐ค previous_version
Type: string
The previous version before the release, if a release was or will be made. If no release is detected, this will be the current version or an empty string if no previous version exists. ๐
๐ released ๐
Type: Literal["true", "false"]
A boolean value that tells you whether a release actually happened. "true" = we cooked, "false" = nothing to see here bestie. ๐ซถ
โจ release_notes โจ
Type: string
The release notes that the release generated โ if there are any. And if no release was made at all? Then this is just an empty string, no cap. ๐ญ
๐ version ๐
Type: string
The shiny new SemVer version string, but only if a release was made. If not, you get the current version instead.
Example: 1.2.3
๐ฆ tag ๐ฆ
Type: string
The Git tag that goes with the version output โ except it's in whatever tag format your config tells it to use. iykyk ๐
Example: v1.2.3
๐ณ Python Semantic Release Publish Action ๐ณ
The official Python Semantic Release Publish Action (https://github.com/marketplace/actions/python-semantic-release-publish) is a GitHub Docker Action (https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-docker-container-action), which basically means that at the very beginning of the job it builds a Docker image stuffed with the Python Semantic Release package and all its dependencies. Then it runs the job step inside that Docker Container. Why? To make sure the environment is consistent across all GitHub Runners no matter the platform. ๐
But babes, that choice comes with some limitations โ things you just can't configure, like a pre-defined python version, no extra 3rd party tools, and an inability to use caching. ๐ซ
The main character benefit here is that it's genuinely easy to set up and use for most projects. Some extra configuration is handled under the hood so you don't have to deal with it yourself. That said, a few customization options are provided, and they're detailed one by one below. ๐
Most importantly: your project's configuration file gets used like normal, because your project gets mounted into the container for the action to use. ๐ซถ
If the action is giving you issues, please open an issue on the python-semantic-release/publish-action repository: https://github.com/python-semantic-release/publish-action/issues
See also:
action.yml(https://github.com/python-semantic-release/publish-action/blob/main/action.yml) โ the code definition for the publish action
๐ฅ Inputs ๐ฅ
GitHub Action inputs are used for select configuration and they carry the info needed to actually run the action. You pass them in with the with keyword in the workflow file. A lot of these inputs mirror the command line options available in the publish command, and the rest are specific to tweaking the action environment. This section walks through every supported input and what it's for. โจ
๐ธ config_file ๐ธ
Path to a custom semantic-release configuration file. By default, an empty string will go looking for the pyproject.toml file in the current directory. This is the exact same thing as passing the -c or --config parameter to semantic-release.
Required: false
Default: ""
See also:
cmd-main-option-configfor thesemantic-releasecommand
๐ directory ๐
If your project isn't sitting at the root of the repo (hi monorepos ๐), you can name a sub-directory to change into before running semantic-release.
Required: false
Default: .
๐ github_token ๐
The GitHub Token is essential โ it's what gives you access to your GitHub repository so assets can be published to a release. And bestie, you don't just hand over the token, you also have to make sure it has the right permissions. ๐ค
The token should have the following permissions (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions):
contents: write: Required for modifying a GitHub Release
Required: true
๐ no_operation_mode ๐
If you set this to true, the github action will pass the --noop parameter to semantic-release. That makes semantic-release run in "no operation" mode.
Super useful for testing the action without actually publishing anything. ๐
Required: false
Default: false
See also:
cmd-main-option-noopoption for thesemantic-releasecommand
๐ root_options ๐
Important: This option has been removed in v10.0.0 and newer because of a command injection vulnerability. Please update to v10.0.0 as soon as possible. See Upgrading to v10 (#upgrade-v10-root-options) for more information.
Additional options for the main semantic-release command, which will come before the publish subcommand.
Example
- uses: python-semantic-release/publish-action@v9
with:
root_options: "-vv --noop"
This configuration would cause the command to be semantic-release -vv --noop publish, which would run the publish command verbosely but in no-operation mode.
Required: false
Default: -v
See also:
- Options for the
semantic-releasecommand
๐ tag ๐
Type: string
The tag corresponding to the GitHub Release that the artifacts should be published to. This option is equivalent to running the command:
semantic-release publish --tag <tag>
Python Semantic Release will automatically work out the latest release if no --tag option is provided. ๐
Required: false
See also:
cmd-publish-option-tagoption for thepublishcommand
๐ verbosity ๐
Sets the verbosity level of the output, as the number of -v's to pass to semantic-release. 0 is no extra output, 1 is info level output, 2 is debug output, and 3 is a silly amount of debug output. ๐
Required: false
Default: "1"
See also:
cmd-main-option-verbosityfor thesemantic-releasecommand
๐ค Outputs ๐ค
There are no outputs provided by the Python Semantic Release Publish Action at this time. ๐ญ
Note: If you would like outputs to be provided by this action, please open an issue on thepython-semantic-release/publish-actionrepository:https://github.com/python-semantic-release/publish-action/issues
๐ Examples ๐
๐ Common Workflow Example ๐
Here's a simple, common workflow example that uses both the Python Semantic Release Action and the Python Semantic Release Publish Action. This workflow runs on every push to the main branch and will create a new release once a version determination succeeds. If a version is released, the workflow then publishes the package to PyPI and uploads the package to the GitHub Release Assets as well. Ate. ๐ฅ
name: Continuous Delivery
on:
push:
branches:
- main
# default: least privileged permissions across all jobs
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-release-${{ github.ref_name }}
cancel-in-progress: false
permissions:
contents: write
steps:
# Note: We checkout the repository at the branch that triggered the workflow.
# Python Semantic Release will automatically convert shallow clones to full clones
# if needed to ensure proper history evaluation. However, we forcefully reset the
# branch to the workflow sha because it is possible that the branch was updated
# while the workflow was running, which prevents accidentally releasing un-evaluated
# changes.
- name: Setup | Checkout Repository on Release Branch
uses: actions/checkout@COMMIT_HASH # v6
with:
ref: ${{ github.ref_name }}
- name: Setup | Force release branch to be at workflow sha
run: |
git reset --hard ${{ github.sha }}
- name: Action | Semantic Version Release
id: release
# Adjust tag with desired version if applicable.
uses: python-semantic-release/python-semantic-release@COMMIT_HASH # v10.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
- name: Publish | Upload to GitHub Release Assets
uses: python-semantic-release/publish-action@COMMIT_HASH # v10.6.1
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}
- name: Upload | Distribution Artifacts
uses: actions/upload-artifact@COMMIT_HASH # v4.X.X
with:
name: distribution-artifacts
path: dist
if-no-files-found: error
outputs:
released: ${{ steps.release.outputs.released || 'false' }}
deploy:
# 1. Separate out the deploy step from the publish step to run each step at
# the least amount of token privilege
# 2. Also, deployments can fail, and its better to have a separate job if you need to retry
# and it won't require reversing the release.
runs-on: ubuntu-latest
needs: release
if: ${{ needs.release.outputs.released == 'true' }}
permissions:
contents: read
id-token: write
steps:
- name: Setup | Download Build Artifacts
uses: actions/download-artifact@COMMIT_HASH # v4.X.X
id: artifact-download
with:
name: distribution-artifacts
path: dist
# ------------------------------------------------------------------- #
# Python Semantic Release is not responsible for publishing your #
# python artifacts to PyPI. Use the official PyPA publish action #
# instead. The following steps are an example but is not guaranteed #
# to work as the action is not maintained by the #
# python-semantic-release team. #
# ------------------------------------------------------------------- #
# see https://docs.pypi.org/trusted-publishers/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@COMMIT_HASH # vX.X.X
with:
packages-dir: dist
print-hash: true
verbose: true
Important: bestie the concurrency directive <https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idconcurrency> is sitting on the job specifically so you never get race conditions โ like, if multiple pushes to main land in a short period of time, you do NOT want two release jobs fighting. ๐
Warning: okay so theGITHUB_TOKENsecret is auto-configured by GitHub, and it comes with the same permissions role as the user who triggered the workflow run. That's a whole problem if your default branch is protected to specific users. ๐ซ The workaround: store an administrator's Personal Access Token as a separate secret and use that instead ofGITHUB_TOKEN. But heads up โ you'll also need to pass the new token toactions/checkout(as thetokeninput) so you can actually get push access. ๐
Note: as ofv10.5.0, Python Semantic Release automatically detects shallow clones and converts them to full clones whenever it needs to. So like, you can still usefetch-depth: 0withactions/checkoutto fetch the full history upfront, but it's lowkey not required anymore. If you're rolling with the default shallow clone, PSR will auto-fetch the full history before it evaluates commits. Using an older version of PSR? Then you WILL have to unshallow the repo yourself before use. no cap.
Note: as of v10.5.0, the verify upstream step is no longer required because it got integrated into PSR directly. ๐ Older version of PSR? Go review the older documentation for that step. See Issue #1201 <https://github.com/python-semantic-release/python-semantic-release/issues/1201> for more details.
๐ Version Overrides Example ๐
So when you want to hand multiple command line options to the version command, you pass them through the with directive in the workflow file. In this example we're forcing a patch version bump, not producing a changelog, and providing some specialized build metadata. As a regular CLI command, that's giving:
semantic-release version --patch --no-changelog --build-metadata abc123
The equivalent GitHub Action configuration would be:
# snippet
- name: Action | Semantic Version Release
# Adjust tag with desired version if applicable.
uses: python-semantic-release/python-semantic-release@v10.5.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: patch
changelog: false
build_metadata: abc123
See also:
- Publish Action Manual Release Workflow <https://github.com/python-semantic-release/publish-action/blob/main/.github/workflows/release.yml>: to maintain the Publish Action at the same version as Python Semantic Release, we use a Manual release workflow which forces the matching bump type as the root project. Go check out this workflow to see how you can manually provide input that triggers the desired version bump. ๐
๐ฆ Actions with Monorepos ๐ฆ
Okay so real talk: python-semantic-release does NOT have full monorepo support. But if you've got multiple projects sitting inside a single repository (or your project just isn't at the root of the repo), you can pass the directory input to the action and it'll change directory before semantic-release execution. ๐
For multiple packages, you'd need to run the action multiple times to release each project. The example below shows how to release two projects in a monorepo.
Remember bestie: for each release of each submodule you'll then need to handle publishing each package separately as well. That all depends on the result of your build commands. In the example below, we assume a simple build module command to build an sdist and wheel artifacts into the submodule's dist directory. ๐ฆ
The directory input directive is also available for the Python Semantic Release Publish Action. โจ
jobs:
release:
env:
SUBMODULE_1_DIR: project1
SUBMODULE_2_DIR: project2
steps:
# ------------------------------------------------------------------- #
# Note the use of different IDs to distinguish which submodule was #
# identified to be released. The subsequent actions then reference #
# their specific release ID to determine if a release occurred. #
# ------------------------------------------------------------------- #
- name: Release submodule 1
id: release-submod-1
uses: python-semantic-release/python-semantic-release@v10.5.3
with:
directory: ${{ env.SUBMODULE_1_DIR }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Release submodule 2
id: release-submod-2
uses: python-semantic-release/python-semantic-release@v10.5.3
with:
directory: ${{ env.SUBMODULE_2_DIR }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# ------------------------------------------------------------------- #
# For each submodule, you will have to publish the package separately #
# and only attempt to publish if the release for that submodule was #
# deemed a release (and the release was successful). #
# ------------------------------------------------------------------- #
- name: Publish | Upload package 1 to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.5.3
if: steps.release-submod-1.outputs.released == 'true'
with:
directory: ${{ env.SUBMODULE_1_DIR }}
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release-submod-1.outputs.tag }}
- name: Publish | Upload package 2 to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.5.3
if: steps.release-submod-2.outputs.released == 'true'
with:
directory: ${{ env.SUBMODULE_2_DIR }}
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release-submod-2.outputs.tag }}
# ------------------------------------------------------------------- #
# Python Semantic Release is not responsible for publishing your #
# python artifacts to PyPI. Use the official PyPA publish action #
# instead. The following steps are an example but is not guaranteed #
# to work as the action is not maintained by the #
# python-semantic-release team. #
# ------------------------------------------------------------------- #
- name: Publish | Upload package 1 to PyPI
uses: pypa/gh-action-pypi-publish@COMMIT_HASH # vX.X.X
if: steps.release-submod-1.outputs.released == 'true'
with:
packages-dir: ${{ format('{}/dist', env.SUBMODULE_1_DIR) }}
- name: Publish | Upload package 2 to PyPI
uses: pypa/gh-action-pypi-publish@COMMIT_HASH # vX.X.X
if: steps.release-submod-2.outputs.released == 'true'
with:
packages-dir: ${{ format('{}/dist', env.SUBMODULE_2_DIR) }}
๐ Cron Job Publishing ๐
This one is for you if, for some reason, you cannot publish from your CI, or you would like releases to drop at a certain interval. โฐ But before you start, answer this: are you sure you do not want a CI to release for you? (high version numbers are not a bad thing, bestie.) ๐
The guide below is for setting up scheduled publishing on a server. It requires that the user that runs the cronjob has push access to the repository and upload access to an artifact repository. ๐
- Create a virtualenv:
virtualenv semantic_release -p `which python3`
- Install
python-semantic-release:
pip install python-semantic-release
- Clone the repositories you want to have scheduled publishing.
- Put the following in
publish:
VENV=semantic_release/bin
$VENV/pip install -U pip python-semantic-release > /dev/null
publish() {
cd $1
git stash -u # ensures that there is no untracked files in the directory
git fetch && git reset --hard origin/master
$VENV/semantic-release version && $VENV/semantic-release publish
cd ..
}
publish <package1>
publish <package2>
- Add cronjob:
/bin/bash -c "cd <path> && source semantic_release/bin/activate && ./publish 2>&1 >> releases.log"
โฌ๏ธ Upgrading PSR โฌ๏ธ
Upgrading PSR is a process that may involve several steps, depending on the version you're upgrading from and to. This section is your little guide for going from older versions of PSR to the latest. ๐
Important: if you're upgrading across more than one major version, you should incrementally upgrade through each major version and its configuration update guide to keep the transition smooth. no skipping, bestie. ๐ญ For example, if you're upgrading fromv7tov10, you should first upgrade tov8and then tov9, and then lastly tov10while following the upgrade guide for each version. At every single step you should confirm execution works as expected before proceeding to the next version. periodt.
๐ธ Upgrading to v10 ๐ธ
The upgrade to v10 is primarily motivated by a command injection security vulnerability found in the GitHub Actions configuration interpreter (see details below). ๐ We also bundled a number of other changes, including new default configuration values and, most importantly, a return to 1-line commit subjects in the default changelog format. iconic.
For more specific change details for v10, please refer to the v10.0.0 (2025-05-25) <#changelog-v10-0-0> section of the CHANGELOG <#changelog>. ๐
๐ Security Fix: Command Injection Vulnerability (GitHub Actions)
okay bestie, this one is serious, sit down for it. ๐
In the previous versions of the GitHub Actions configuration, we used a single root_options parameter to pass any options you wanted to pass to the semantic-release main command. That parameter was interpreted as a string and passed directly to the command line, which made it vulnerable to command injection attacks. An attacker could exploit this by crafting a malicious string as the root_options <#gh-actions-psr-inputs-root-options> input, and then it would literally be executed as part of the command line โ potentially letting them run arbitrary commands inside the GitHub Actions Docker container. ๐ญ
ngl the blast radius is limited though: the ability to exploit this vulnerability is limited to people who can modify the GitHub Actions workflow file, which is typically only the repository maintainers โ unless you are pointing at an organizational workflow file or another third-party workflow file. ๐
How we fixed it: to mitigate this vulnerability, we removed theroot_optionsparameter completely and replaced it with individual boolean flag inputs, which are then used to select the proper cli parameters for thesemantic-releasecommand. โจ
Also, you can protect yourself by limiting the access to secrets in your GitHub Actions workflows and the permissions of the GitHub Actions CI TOKEN. ๐ซถ
This vulnerability existed in both the python-semantic-release/python-semantic-release <#gh-actions-psr> and python-semantic-release/publish-action <#gh-actions-publish> actions.
For the main python-semantic-release/python-semantic-release <#gh-actions-psr> action, the following inputs are now available (in place of the old root_options parameter): config_file <#gh-actions-psr-inputs-config-file>, no_operation_mode <#gh-actions-psr-inputs-noop>, strict <#gh-actions-psr-inputs-strict>, and verbosity <#gh-actions-psr-inputs-verbosity>.
Example migration ๐
If you previously had the following in your GitHub Actions workflow file:
- uses: python-semantic-release/python-semantic-release@v9
with:
root_options: "-vv --strict"
It would be updated to:
- uses: python-semantic-release/python-semantic-release@v10
with:
strict: true
verbosity: 2
For the python-semantic-release/publish-action <#gh-actions-publish> action, the following inputs are now available (in place of the old root_options parameter): config_file <#gh-actions-publish-inputs-config-file>, no_operation_mode <#gh-actions-publish-inputs-noop>, and verbosity <#gh-actions-publish-inputs-verbosity>.
Example migration ๐
If you previously had the following in your GitHub Actions workflow file:
- uses: python-semantic-release/publish-action@v9
with:
root_options: "-v -c /path/to/releaserc.yaml"
It would be updated to:
- uses: python-semantic-release/publish-action@v10
with:
config_file: /path/to/releaserc.yaml
verbosity: 1
๐ Changelog Format: 1-Line Commit Subjects
In v10, the default changelog format has been changed to use 1-line commit subjects instead of including the full commit message. โจ Why? Because this change was made to improve the readability of the changelog โ many commit messages are long and contain unnecessary details for the changelog. lowkey so real.
Important: if you use a squash commit merge strategy, it is recommended that you use the default parse_squash_commits commit parser option to ensure that all the squashed commits are parsed for version bumping and changelog generation. This is the default behavior in v10 across all supported commit parsers. If you are upgrading, you likely will need to manually set this option in your configuration file to ensure that the changelog is generated correctly.
Important: if you do not enable parse_squash_commits, then version will only be determined by the commit subject line and the changelog will only include the commit subject line as well. ๐ซ
๐ญ Changelog Format: Mask Initial Release
In v10, the default behavior for the changelog generation has been changed to mask the initial release in the changelog. What that means bestie: the first release will not contain a break down of the different types of changes (e.g., features, fixes, etc.), but instead it will just simply state that this is the initial release. ๐
๐ Changelog Format: Commit Parsing
We have made some minor changes to the commit parsing logic in v10 to separate out components of the commit message more clearly. You will find that the ParsedCommit <#semantic_release.commit_parser.token.ParsedCommit> object's descriptions list will no longer contain any Breaking Change footers, Release Notice footers, PR/MR references, or Issue Closure footers. Those were all previously extracted and placed into their own attributes, but were still included in the descriptions list. In v10, the descriptions list will only contain the actual commit subject line and any additional commit body text that is not part of the pre-defined footers. ๐
If you were relying on the descriptions list to contain these footers, you will need to update your code and changelog templates to reference the specific attributes you want to use. ๐ง
โ๏ธ Default Configuration Changes
The following table summarizes the changes to the default configuration values in v10:
allow_zero_version<#config-allow-zero-version> โ Previous Default Value:trueโ New Default Value:falsechangelog.mode<#config-changelog-mode> โ Previous Default Value:initโ New Default Value:updatechangelog.default_templates.mask_initial_release<#config-changelog-default-templates-mask-initial-release> โ Previous Default Value:falseโ New Default Value:truecommit_parser_options.parse_squash_commits<#config-commit-parser-options> โ Previous Default Value:falseโ New Default Value:truecommit_parser_options.ignore_merge_commits<#config-commit-parser-options> โ Previous Default Value:falseโ New Default Value:true
๐๏ธ Deprecations & Removals
No additional deprecations were made in v10, but the following are staged for removal in v11:
๐ซ Deprecated Features & Functions ๐
okay bestie, here's the receipts on everything that's on its way out. read the ๐ Deprecated column (when it got marked) v. the ๐ชฆ Planned Removal column (when it's actually leaving) โ iykyk, don't get caught slipping:
# 1โ Component: GitHub Actionsroot_options<#gh-actions-psr-inputs-root-options>ยท Deprecated:v10.0.0ยท Planned Removal:v10.0.0ยท Notes: Replaced with individual boolean flag inputs. See above for details.# 2โ Component: Angular Commit Parser<#commit-parser-builtin-angular>ยท Deprecated:v9.19.0ยท Planned Removal:v11.0.0ยท Notes: Replaced by the Conventional Commit Parser<#commit-parser-builtin-conventional>.# 3โ Component: Tag Commit Parser<#commit-parser-builtin-tag>ยท Deprecated:v9.12.0ยท Planned Removal:v11.0.0ยท Notes: Replaced by the Emoji Commit Parser<#commit-parser-builtin-emoji>.
๐ Note: for the most up-to-date info on the next version's deprecations and removals, go peep issue #1066 <https://github.com/python-semantic-release/python-semantic-release/issues/1066>. that's the source of truth, fr fr.
๐ Upgrading to v9 โจ
bestie you are in luck โ the upgrade to v9 is literally a simple one. no drama, no fifteen-step migration arc. ๐ซถ
the one breaking change for this version is the removal of support for Python 3.7, because it's officially passed End-Of-Life (EOL). so if you're out here on Python 3.7, you gotta upgrade to at least Python 3.8 to use v9. and heads up โ this is permanent, no take-backs: all future versions of python-semantic-release will require Python 3.8 or later. periodt. ๐
๐ Upgrading to v8 โจ
so Python Semantic Release v8.0.0 introduced a whole bunch of breaking changes ๐ญ. the internals got changed significantly โ all so the project could better support highly-requested features and streamline maintenance. glow-up, basically.
which means: certain things got removed, certain things got reimplemented differently, and certain things now behave differently than in earlier versions of Python Semantic Release. this page is your guide so you can pip install python-semantic-release>=8.0.0 with fewer surprises. we got you. ๐
๐ Python Semantic Release GitHub Action ๐
GitHub Action no longer publishes artifacts to PyPI or GitHub Releases
Python Semantic Release no longer uploads distributions to PyPI โ see Repurposing of version and publish commands below. and if you were using Python Semantic Release to publish release notes and artifacts to GitHub releases, there's a shiny new GitHub Action for that: upload-to-gh-release <https://github.com/python-semantic-release/upload-to-gh-release>, and it'll do the job for you. โจ
what that means: the two workflows below do the exact same actions, and if you're using the first one, you'll need to modify your workflow to include the steps from the second one.
this workflow is written to use Python Semantic Release v7.33.5:
---
name: Semantic Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
steps:
- uses: actions/checkout@COMMIT_HASH # v3.0.0
with:
fetch-depth: 0
# This action uses Python Semantic Release v7
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@323ebf700ac0878aedfa899bcb0492f6d579986c # v7.33.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
and this following workflow achieves the same result using Python Semantic Release v8, the upload-to-gh-release <https://github.com/python-semantic-release/upload-to-gh-release> GitHub Action, and the pypa/gh-action-pypi-publish <https://github.com/pypa/gh-action-pypi-publish> GitHub Action:
---
name: Semantic Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
steps:
- uses: actions/checkout@COMMIT_HASH # v3.0.0
with:
fetch-depth: 0
# This action uses Python Semantic Release v8
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@COMMIT_HASH # v8.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@COMMIT_HASH # v1.0.0
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'
- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@COMMIT_HASH # v8.0.0
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Removal of pypi_token, repository_username and repository_password inputs
since the library no longer supports publishing to PyPI, the pypi_token, repository_username and repository_password inputs of the GitHub action have all been removed. ๐ for how to publish to PyPI, peep the section just above โ you do it with the official GitHub Action from the Python Packaging Authority (PyPA).
Rename additional_options to root_options
because the purposes of the cmd-version and cmd-publish commands have changed, the GitHub action now runs both commands in sequence. so for that reason, and because the CLI usage has changed, additional_options has been renamed to root_options โ which just reflects the fact that the options belong to the main cmd-main command group. honest naming, we love to see it. ๐
โจ๏ธ Commands
Repurposing of version and publish commands
Python Semantic Release's main character purpose is enabling automation of correct semantic versioning for software projects. and over the years, that automation got extended into other stuff: building/publishing the project and its artifacts to artefact repositories, creating releases in remote version control systems, and writing changelogs. busy queen. ๐
but in Python Semantic Release <8.0.0, the publish command was a one-stop-shop that did every single piece of automation provided. that's changed now, bestie:
- the
versioncommand now handles determining the next version, applying the changes to the project metadata according to the configuration, writing a changelog, and committing/pushing changes to the remote Git repository. it also handles creating a release in the remote VCS. it does not publish software artifacts to remote repositories such as PyPI โ and the rationale is simply that under the hood, Python Semantic Release usedtwine<https://twine.readthedocs.io/en/stable> to upload artifacts to package indexes such as PyPI, and it's recommended to usetwinedirectly via the command-line. - the
publishcommand now handles publishing software artifacts to releases in the remote version control system.
straight from the twine documentation <https://twine.readthedocs.io/en/stable/contributing.html#architectural-overview>:
Twine is a command-line tool for interacting with PyPI securely over HTTPS.
and as a result, Python Semantic Release no longer depends on twine internals. slay. โจ
so to get a similar flow of logic like
- Determine the next version
- Write this version to the configured metadata locations
- Write the changelog
- Push the changes to the metadata and changelog to the remote repository
- Create a release in the remote version control system
- Build a wheel
- Publish the wheel to PyPI
- Publish the distribution artifacts to the release in the remote VCS
you should run:
semantic-release version
twine upload dist/* # or whichever path your distributions are placed in
semantic-release publish
with steps 1-6 being handled by the cmd-version command, step 7 left to the developer to handle, and lastly step 8 handled by the cmd-publish command. ๐ง
Removal of -D/--define command-line option
it is no longer possible to override arbitrary configuration values using the -D/--define option. ๐ญ instead, you should provide the appropriate values via a configuration file using cmd-main-option-config, or via the available command-line options.
This is the part that makes everything simpler, and bestie, that matters โ it means the command-line option parsing gets way less error-prone, and lowkey that area used to cause actual real-world issues (like #600 over at https://github.com/python-semantic-release/python-semantic-release/issues/600) whenever people tried to do overrides straight on the command line. ๐ญ See, some of the config values Python Semantic Release expects are full-on complex data types โ lists, nested structures, the whole situation โ and hand-typing those as plain command-line options is tedious and, ngl, extremely easy to get wrong. ๐
๐ฎ Removal of CI verifications
Before v8, Python Semantic Release would do some prerequisite verification of environment variables before making any version changes via the publish command. But it's just not feasible for Python Semantic Release to fully verify every possible CI environment, and honestly these checks only fired if certain environment variables were set โ they would never fail locally. ๐
Those checks used to raise :py:class:semantic_release.CiVerificationError, and they were literally the only place that custom exception was used. So yeah โ that exception got removed from Python Semantic Release in v8 too. ๐๏ธ
If you were relying on that functionality, it's recommended that you add the following shell commands before invoking semantic-release, so you can verify your environment yourself:
Note: In the following,$RELEASE_BRANCHrefers to the git branch against which you run your releases using Python Semantic Release. You will need to ensure it is set properly (e.g. viaexport RELEASE_BRANCH=mainand/or replace the variable with the branch name you want to verify the CI environment for.
๐ Travis
Condition: environment variable TRAVIS=true
Replacement:
if ! [[
$TRAVIS_BRANCH == $RELEASE_BRANCH && \
$TRAVIS_PULL_REQUEST == 'false'
]]; then
exit 1
fi
๐ฆ Semaphore
Condition: environment variable SEMAPHORE=true
Replacement:
if ! [[
$BRANCH_NAME == $RELEASE_BRANCH && \
$SEMAPHORE_THREAD_RESULT != 'failed' && \
-n $PULL_REQUEST_NUMBER
]]; then
exit 1
fi
๐ฃ Frigg
Condition: environment variable FRIGG=true
Replacement:
if ! [[
$FRIGG_BUILD_BRANCH == $RELEASE_BRANCH && \
-n $FRIGG_PULL_REQUEST
]]; then
exit 1
fi
โญ Circle CI
Condition: environment variable CIRCLECI=true
Replacement:
if ! [[
$CIRCLE_BRANCH == $RELEASE_BRANCH && \
-n $CI_PULL_REQUEST
]]; then
exit 1
fi
๐ฆ GitLab CI
Condition: environment variable GITLAB_CI=true
Replacement:
if ! [[ $CI_COMMIT_REF_NAME == $RELEASE_BRANCH ]]; then
exit 1
fi
Condition: environment variable BITBUCKET_BUILD_NUMBER is set
Replacement:
if ! [[
$BITBUCKET_BRANCH == $RELEASE_BRANCH && \
-n $BITBUCKET_PR_ID
]]; then
exit 1
fi
๐ชฃ Jenkins
Condition: environment variable JENKINS_URL is set
Replacement:
if [[ -z $BRANCH_NAME ]]; then
BRANCH_NAME=$BRANCH_NAME
elif [[ -z $GIT_BRANCH ]]; then
BRANCH_NAME=$GIT_BRANCH
fi
if ! [[
$BRANCH_NAME == $RELEASE_BRANCH && \
-n $CHANGE_ID
]]; then
exit 1
fi
๐งฑ Removal of Build Status Checking
Prior to v8, Python Semantic Release had a configuration option called check_build_status, which would try to block a release from happening if it could tell that the matching build pipeline was failing. โ For basically the same reasons that motivated the removal of CI Checks, this feature is gone too, bestie. ๐
If you're using this feature in Python Semantic Release v7, these bash commands will replace the functionality, and you can drop them into your pipeline. You'll need jq and curl installed to run them; they're easy to install through your system's package manager โ for example on Ubuntu:
sudo apt update && sudo apt upgrade
sudo apt install -y curl jq
On Windows, you can refer to the installation guide for jq at https://jqlang.github.io/jq/download/, and if curl isn't already installed, you can grab it from the curl website at https://curl.se/
๐ GitHub
export RESP="$(
curl \
-H "Authorization: token $GITHUB_TOKEN" \
-fSsL https://$GITHUB_API_DOMAIN/repos/$REPO_OWNER/$REPO_NAME/commits/$(git rev-parse HEAD)/status || exit 1
)"
if [ $(jq -r '.state' <<< "$RESP") != "success" ]; then
echo "Build status is not success" >&2
exit 1
fi
Note that $GITHUB_API_DOMAIN is typically api.github.com unless you are using GitHub Enterprise with a custom domain name. ๐
๐ต Gitea
export RESP="$(
curl \
-H "Authorization: token $GITEA_TOKEN" \
-fSsL https://$GITEA_DOMAIN/repos/$REPO_OWNER/$REPO_NAME/statuses/$(git rev-parse HEAD) || exit 1
)"
if [ $(jq -r '.state' <<< "$RESP") != "success" ]; then
echo "Build status is not success" >&2
exit 1
fi
๐ฆ Gitlab
export RESP="$(
curl \
-H "Authorization: token $GITLAB_TOKEN" \
-fSsL https://$GITLAB_DOMAIN/api/v4/projects/$PROJECT_ID/repository/commits/$(git rev-parse HEAD)/statuses
)"
for line in $(jq -r '.[] | [.name, .status, .allow_failure] | join("|")' <<<"$RESP"); do
IFS="|" read -r job_name job_status allow_failure <<<"$line"
if [ "$job_status" == "pending" ]; then
echo "job $job_name is pending" >&2
exit 1
elif [ "$job_status" == "failed" ] && [ ! "$allow_failure" == "true" ]; then
echo "job $job_name failed" >&2
exit 1
fi
done
๐ฟ Multibranch releases
Prior to v8, Python Semantic Release would do a git checkout to hop over to your configured release branch and figure out whether a release needed to be made. In v8? Nope, changed. ๐ซถ You now have to manually check out the branch you want to release against, and if you want to create releases against that branch, you also need to make sure it belongs to a release group (<#multibranch-releases-configuring>).
๐ changelog command
A brand new option has appeared: cmd-changelog-option-post-to-release-tag. โจ If you skip this argument on the command line, the changelog rendering process โ described in more detail at Custom Changelogs (<#changelog-templates-template-rendering>) โ will still be triggered, but the new changelog won't get posted to any release. If you do use this new command-line option, it should be set to a tag within the remote that has a corresponding release. For example, to update the changelog and post it to the release corresponding to the tag v1.1.4, you'd run:
semantic-release changelog --post-to-release-tag v1.1.4
๐จ Changelog customization
A bunch of options related to customizing the changelog have been removed. Why? Because Python Semantic Release now supports authoring a completely custom Jinja template (Jinja lives at https://jinja.palletsprojects.com/en/3.1.x/) that holds the contents of your changelog. ๐ Historically, the number of options added to Python Semantic Release just to allow this customization grew like crazy; now it uses templates instead, which fully opens up customizing how your changelog looks. ๐
โ๏ธ Configuration
The configuration structure has been completely reworked, so please read Configuration (<#configuration>) carefully while you're upgrading to v8+. ๐ That said, a few common pitfalls and potential sources of confusion are summarized right here.
๐ซ setup.cfg is no longer supported
Python Semantic Release no longer supports configuration via setup.cfg. Reason being: the Python ecosystem is centering around pyproject.toml as the universal tool and project configuration file, and TOML allows expressions via configuration โ like the mechanism for declaring configuration via environment variables โ which would introduce so much more complexity to support in the otherwise equivalent ini-format configuration. ๐ตโ๐ซ
You can use cmd-generate-config to generate new-format configuration that can be added to pyproject.toml, and then adjust the default settings to your needs.
Warning: If you don't already have apyproject.tomlconfiguration file,pipcan change its behavior once you add one, as a result of PEP-517 (https://peps.python.org/pep-0517/#evolutionary-notes). If you find that this breaks your packaging, you can add your Python Semantic Release configuration to a separate file such assemantic-release.toml, and use the--configoption to reference this alternative configuration file. More detail about this issue can be found in this pip issue athttps://github.com/pypa/pip/issues/8437#issuecomment-805313362.
๐งฉ Commit parser options
Options such as major_emoji, parser_angular_patch_types or parser_angular_default_level_bump have been removed. ๐๏ธ Instead, they've been replaced with a single set of recognized commit parser options: allowed_tags, major_tags, minor_tags, and patch_tags โ though how you interpret those is up to whichever specific parsers are in use. You can read more detail about using commit parser options in commit_parser_options (<#config-commit-parser-options>), and if you need to parse multiple commit styles for a single project, it's recommended that you create a parser following Custom Parsers (<#commit-parser-custom-parser>) that's tailored to your project's specific needs. ๐ ๏ธ
๐ท๏ธ version_variable
This option has been renamed to version_variables (<#config-version-variables>) because it refers to a list of variables which can be updated. ๐
๐ version_pattern
This option has been removed. It's recommended to use an alternative tool to perform substitution using arbitrary regular expressions, such as sed. You can always use Python Semantic Release to identify the next version to be created for a project and store it in an environment variable like so:
export VERSION=$(semantic-release version --print)
๐ version_toml
This option will no longer accept a string or comma-separated string of version locations to be updated in TOML files. Instead, you must supply a List[str]. ๐ซก For existing configurations using a single location in this option, you can simply wrap the value in []:
# Python Semantic Release v7 configuration
[tool.semantic_release]
version_toml = "pyproject.toml:tool.poetry.version"
# Python Semantic Release v8 configuration
[tool.semantic_release]
version_toml = ["pyproject.toml:tool.poetry.version"]
๐ tag_format
okay so this one does literally the same thing it did back in Python Semantic Release before v8 โ same vibes, same effect. BUT โจ plot twist โจ: Python Semantic Release will now verify that it has a {version} format key and will straight up raise an error if it doesn't. so like, don't forget your {version} bestie, it's not optional anymore ๐ค
๐ upload_to_release
this one got a glow-up and a new name, she's now called upload_to_vcs_release (see #config-publish-upload-to-vcs-release). same girl, new label ๐
๐ง Custom Commit Parsers
so back in the day, a custom commit parser had to tick all these boxes:
- it had to be import-able from the virtual environment where the
semantic-releaseis run ๐ - it had to be a function that takes the commit message as its only argument and returns a
semantic_release.history.parser_helpers.ParsedCommitif the commit parses successfully, or raises asemantic_release.UnknownCommitMessageStyleErrorif parsing is unsuccessful ๐จ
and like โ you can still implement custom commit parsers, that dream is not dead ๐ซถ but the interface for doing it has been modified, with stronger support for Python type annotations and broader input handed to the parser, so you can capture way more info from each commit โ like the commit's date and author, if that's your thing. a full guide to implementing a custom commit parser lives at Custom Parsers (see #commit-parser-custom-parser). go off, king ๐
๐ง Troubleshooting
- check your configuration file for Configuration (see
#configuration) ๐ - check your Git tags match your
tag_format(see#config-tag-format); tags using other formats are ignored during calculation of the next version. so if your tags look weird and nothing's happening, that's lowkey why bestie ๐ญ
๐ Increasing Verbosity
if you're having trouble with Python Semantic Release, or you just wanna see extra info about the actions it's taking, you can use the top-level cmd-main-option-verbosity option โจ. you can supply it multiple times to crank up the logging verbosity of the cmd-main command or any of its subcommands while they execute. supply it as many times as you like โ but supplying more than twice has no effect, so don't waste the keystrokes bestie ๐
- supply
cmd-main-option-verbosityonce forINFOoutput - supply it twice for
DEBUG
for example:
semantic-release -vv version --print
Note: thecmd-main-option-verbosityoption must be supplied to the top-levelsemantic-releasecommand, before the name of any sub-command. not after. before. iykyk ๐ซถ
Warning: the volume of logs when usingDEBUGverbosity may be significantly increased, compared toINFOor the defaultWARNING, and as a result executing commands withsemantic-releasemay be significantly slower than when usingDEBUG. so like... buckle up ๐ข๐
Note: the provided GitHub action sets the verbosity level to INFO by default. cute of her tbh ๐
๐ฆ src
๐ semantic_release package
Python Semantic Release
semantic_release.setup_hook(argv: list[str]) -> None
a hook to be used in setup.py to enable python setup.py publish ๐ฅ
Parameters
argvโsys.argv
๐ Subpackages
๐ semantic_release.changelog package
๐ Submodules
๐ semantic_release.changelog.context module
class semantic_release.changelog.context.ChangelogContext(repo_name: 'str', repo_owner: 'str', hvcs_type: 'str', history: 'ReleaseHistory', changelog_mode: "Literal['update', 'init']", prev_changelog_file: 'str', changelog_insertion_flag: 'str', mask_initial_release: 'bool', filters: 'tuple[Callable[..., Any], ...]' = ())
Bases: object
bind_to_environment(env: Environment) -> Environmentchangelog_insertion_flag: strchangelog_mode: Literal['update', 'init']filters: tuple[Callable[..., Any], ...] = ()history: ReleaseHistory(see#semantic_release.changelog.release_history.ReleaseHistory)hvcs_type: strmask_initial_release: boolprev_changelog_file: strrepo_name: strrepo_owner: str
class semantic_release.changelog.context.ChangelogMode(*values)
Bases: Enum
INIT = 'init'UPDATE = 'update'
class semantic_release.changelog.context.ReleaseNotesContext(repo_name: 'str', repo_owner: 'str', hvcs_type: 'str', version: 'Version', release: 'Release', mask_initial_release: 'bool', license_name: 'str', filters: 'tuple[Callable[..., Any], ...]' = ())
Bases: object
bind_to_environment(env: Environment) -> Environmentfilters: tuple[Callable[..., Any], ...] = ()hvcs_type: strlicense_name: strmask_initial_release: boolrelease: Release(see#semantic_release.changelog.release_history.Release)repo_name: strrepo_owner: strversion: Version(see#semantic_release.version.version.Version)
semantic_release.changelog.context.autofit_text_width(text: str, maxwidth: int = 100, indent_size: int = 0) -> str
format the description text to fit within a specified width ๐โจ
semantic_release.changelog.context.convert_md_to_rst(md_content: str) -> str
semantic_release.changelog.context.create_pypi_url(package_name: str, version: str = '') -> str
semantic_release.changelog.context.make_changelog_context(hvcs_client: HvcsBase, release_history: ReleaseHistory, mode: ChangelogMode, prev_changelog_file: Path, insertion_flag: str, mask_initial_release: bool) -> ChangelogContext
(that ReleaseHistory is #semantic_release.changelog.release_history.ReleaseHistory, ChangelogMode is #semantic_release.changelog.context.ChangelogMode, and the return ChangelogContext is #semantic_release.changelog.context.ChangelogContext ๐)
semantic_release.changelog.context.read_file(filepath: str) -> str
๐ semantic_release.changelog.release_history module
class semantic_release.changelog.release_history.Release
Bases: TypedDict
committer: Actorelements: dict[str, list[ParseResult]]tagged_date: datetimetagger: Actorversion: Version(see#semantic_release.version.version.Version)
class semantic_release.changelog.release_history.ReleaseHistory(unreleased: dict[str, list[ParseResult]], released: dict[Version, Release])
Bases: object
classmethod from_git_history(repo: Repo, translator: VersionTranslator, commit_parser: CommitParser[ParseResult, ParserOptions], exclude_commit_patterns: Iterable[Pattern[str]] = ()) -> ReleaseHistory(see#semantic_release.changelog.release_history.ReleaseHistory)release(version: Version, tagger: Actor, committer: Actor, tagged_date: datetime) -> ReleaseHistory(see#semantic_release.changelog.release_history.ReleaseHistory)
(wanna know where all those types hang out? #semantic_release.version.version.Version for Version, #semantic_release.version.translator.VersionTranslator for VersionTranslator, #semantic_release.changelog.release_history.Release for Release, and #semantic_release.changelog.release_history.ReleaseHistory for the whole return value ๐ฆ)
๐ semantic_release.changelog.template module
class semantic_release.changelog.template.ComplexDirectorySandboxedEnvironment(*args: Any, **kwargs: Any)
Bases: SandboxedEnvironment
join_path(template: str, parent: str) -> str
add support for complex directory structures in the template directory ๐๏ธโจ
this method overrides the default functionality of the SandboxedEnvironment where all 'include' keywords expect to be in the same directory as the calling template โ however this is unintuitive when using a complex directory structure ๐
this override simulates the changing of directories when you include the template from a child directory. when the child then includes a template, it will make the path relative to the child directory rather than the top level template directory. it's giving actual filesystem behaviour, and honestly? iconic ๐
semantic_release.changelog.template.environment(template_dir: Path | str = '.', block_start_string: str = '{%', block_end_string: str = '%}', variable_start_string: str = '{{', variable_end_string: str = '}}', comment_start_string: str = '{#', comment_end_string: str = '#}', line_statement_prefix: str | None = None, line_comment_prefix: str | None = None, trim_blocks: bool = False, lstrip_blocks: bool = False, newline_sequence: Literal['\n', '\r', '\r\n'] = '\n', keep_trailing_newline: bool = False, extensions: Iterable[str] = (), autoescape: bool | str = True) -> SandboxedEnvironment
create a jinja2.sandbox.SandboxedEnvironment with certain parameter restrictions ๐
for example the Loader is fixed to FileSystemLoader, although the searchpath is configurable ๐
autoescape can be a string, in which case it should follow the convention module:attr โ in this instance it will be dynamically imported. see <https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Environment> for full parameter descriptions ๐
semantic_release.changelog.template.recursive_render(template_dir: Path, environment: Environment, _root_dir: str | os.PathLike[str] = '.') -> list[str]
๐ semantic_release.cli package
๐ Subpackages
๐ semantic_release.cli.commands package
๐ Submodules
๐ semantic_release.cli.commands.changelog module
semantic_release.cli.commands.changelog.get_license_name_for_release(tag_name: str, project_root: Path) -> str
semantic_release.cli.commands.changelog.post_release_notes(release_tag: str, release_notes: str, prerelease: bool, hvcs_client: RemoteHvcsBase, noop: bool = False) -> None
(that RemoteHvcsBase is #semantic_release.hvcs.remote_hvcs_base.RemoteHvcsBase ๐ซถ)
๐ semantic_release.cli.commands.generate_config module
๐ semantic_release.cli.commands.main module
class semantic_release.cli.commands.main.Cli(name: str | None = None, commands: MutableMapping[str, Command] | Sequence[Command] | None = None, **attrs: Any)
Bases: Group
Root Group for the semantic-release CLI ๐โจ
class SubCmds(*values)
Bases: Enum
Subcommand import definitions ๐ฅ
CHANGELOG = 'semantic_release.cli.commands.changelog'GENERATE_CONFIG = 'semantic_release.cli.commands.generate_config'PUBLISH = 'semantic_release.cli.commands.publish'VERSION = 'semantic_release.cli.commands.version'get_command(ctx: Context, cmd_name: str) -> Command | None
given a context and a command name, this returns a Command object if it exists, or returns None ๐ซฅ
list_commands(ctx: Context) -> list[str]
returns a list of subcommand names in the order they should appear ๐
๐ semantic_release.cli.commands.publish module
semantic_release.cli.commands.publish.publish_distributions(tag: str, hvcs_client: RemoteHvcsBase, dist_glob_patterns: tuple[str, ...], noop: bool = False) -> None
(and yep, RemoteHvcsBase is still #semantic_release.hvcs.remote_hvcs_base.RemoteHvcsBase ๐)
๐ง semantic_release.cli.commands.version module
apply_version_to_source_files
semantic_release.cli.commands.version.apply_version_to_source_files(repo_dir: Path, version_declarations: Sequence[IVersionReplacer], version: Version, noop: bool = False) -> list[str]
bestie this one goes in and rewrites ur version declarations in the source files, and hands u back a list[str] like it's nothing ๐
build_distributions
semantic_release.cli.commands.version.build_distributions(build_command: str | None, build_command_env: Mapping[str, str] | None = None, noop: bool = False) -> None
Run the build command to build the distributions. fr fr that's the whole job.
Parameters ๐ธ
build_commandโ The build command to run.build_command_envโ The environment variables to use when running the build command.noopโ Whether or not to run the build command.
Raises ๐ญ BuildDistributionsError: if the build command fails
ngl if that build command faceplants, it's throwing BuildDistributionsError at u. no cap.
get_windows_env
semantic_release.cli.commands.version.get_windows_env() -> Mapping[str, str | None]
is_forced_prerelease
semantic_release.cli.commands.version.is_forced_prerelease(as_prerelease: bool, forced_level_bump: LevelBump | None, prerelease: bool) -> bool
Determine if this release is forced to have prerelease on/off. Here's the tea ๐ซ: if force_prerelease is set then yes. Otherwise if we are forcing a specific level bump without force_prerelease, it's False. Otherwise (when force_level is None) use the value of prerelease.
is_windows
semantic_release.cli.commands.version.is_windows() -> bool
last_released
semantic_release.cli.commands.version.last_released(repo_dir: Path, tag_format: str, add_partial_tags: bool = False) -> tuple[Tag, Version] | None
shell
semantic_release.cli.commands.version.shell(cmd: str, *, env: Mapping[str, str] | None = None, check: bool = True) -> subprocess.CompletedProcess
version_from_forced_level
semantic_release.cli.commands.version.version_from_forced_level(repo_dir: Path, forced_level_bump: LevelBump, translator: VersionTranslator) -> Version
๐ฆ Submodules
semantic_release.cli.changelog_writer module โจ
apply_user_changelog_template_directory
semantic_release.cli.changelog_writer.apply_user_changelog_template_directory(template_dir: Path, environment: Environment, destination_dir: Path, noop: bool = False) -> list[str]
generate_release_notes
semantic_release.cli.changelog_writer.generate_release_notes(hvcs_client: HvcsBase, release: Release, template_dir: Path, history: ReleaseHistory, style: str, mask_initial_release: bool, license_name: str = '') -> str
get_default_tpl_dir
semantic_release.cli.changelog_writer.get_default_tpl_dir(style: str, sub_dir: str | None = None) -> Path
render_default_changelog_file
semantic_release.cli.changelog_writer.render_default_changelog_file(output_format: ChangelogOutputFormat, changelog_context: ChangelogContext, changelog_style: str) -> str
render_release_notes
semantic_release.cli.changelog_writer.render_release_notes(release_notes_template_file: str, template_env: Environment) -> str
write_changelog_files
semantic_release.cli.changelog_writer.write_changelog_files(runtime_ctx: RuntimeContext, release_history: ReleaseHistory, hvcs_client: HvcsBase, noop: bool = False) -> list[str]
write_default_changelog
semantic_release.cli.changelog_writer.write_default_changelog(changelog_file: Path, destination_dir: Path, output_format: ChangelogOutputFormat, changelog_context: ChangelogContext, changelog_style: str, noop: bool = False) -> str
semantic_release.cli.cli_context module ๐
class semantic_release.cli.cli_context.CliContextObj
class semantic_release.cli.cli_context.CliContextObj(ctx: click.Context, logger: logging.Logger, global_opts: GlobalCommandLineOptions)
Bases: object
property raw_config: RawConfig โ slay, there it is.
property runtime_ctx: RuntimeContext โ Lazy load the runtime context. This is done to avoid configuration loading when the command is not run. This is useful for commands like --help and --version. the way it just waits until it's actually needed? iconic resource management ๐
semantic_release.cli.config module ๐
class semantic_release.cli.config.BranchConfig
class semantic_release.cli.config.BranchConfig(*, match: str = '(main|master)', prerelease_token: str = 'rc', prerelease: bool = False)
Bases: BaseModel
match: strmodel_config = {}โ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].prerelease: boolprerelease_token: strclassmethod validate_match(match: str) -> str
class semantic_release.cli.config.ChangelogConfig
class semantic_release.cli.config.ChangelogConfig(*, changelog_file: str = '', default_templates: DefaultChangelogTemplatesConfig = DefaultChangelogTemplatesConfig(changelog_file='CHANGELOG.md', output_format=<ChangelogOutputFormat.MARKDOWN: 'md'>, mask_initial_release=True), environment: ChangelogEnvironmentConfig = ChangelogEnvironmentConfig(block_start_string='{%', block_end_string='%}', variable_start_string='{{', variable_end_string='}}', comment_start_string='{#', comment_end_string='#}', line_statement_prefix=None, line_comment_prefix=None, trim_blocks=False, lstrip_blocks=False, newline_sequence='\n', keep_trailing_newline=False, extensions=(), autoescape=False), exclude_commit_patterns: Tuple[str, ...]=(), mode: ChangelogMode = ChangelogMode.UPDATE, insertion_flag: str = '', template_dir: str = 'templates')
Bases: BaseModel
changelog_file: strโ Deprecated! Moved to'default_templates.changelog_file'๐ pls stop using this one bestie, it's giving legacy.classmethod changelog_file_deprecation_warning(val: str) -> strdefault_templates: DefaultChangelogTemplatesConfigenvironment: ChangelogEnvironmentConfigexclude_commit_patterns: Tuple[str, ...]insertion_flag: strload_default_insertion_flag_on_missing() -> Selfmode: ChangelogModemodel_config = {}โ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].move_changelog_file() -> Selftemplate_dir: strclassmethod validate_match(patterns: Tuple[str, ...]) -> Tuple[str, ...]
class semantic_release.cli.config.ChangelogEnvironmentConfig
class semantic_release.cli.config.ChangelogEnvironmentConfig(*, block_start_string: str = '{%', block_end_string: str = '%}', variable_start_string: str = '{{', variable_end_string: str = '}}', comment_start_string: str = '{#', comment_end_string: str = '#}', line_statement_prefix: str | None = None, line_comment_prefix: str | None = None, trim_blocks: bool = False, lstrip_blocks: bool = False, newline_sequence: Literal['\n', '\r', '\r\n'] = '\n', keep_trailing_newline: bool = False, extensions: Tuple[str, ...] = (), autoescape: bool | str = False)
Bases: BaseModel
autoescape: bool | strblock_end_string: strblock_start_string: strcomment_end_string: strcomment_start_string: strextensions: Tuple[str, ...]keep_trailing_newline: boolline_comment_prefix: str | Noneline_statement_prefix: str | Nonelstrip_blocks: boolmodel_config = {}โ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].newline_sequence: Literal['\n', '\r', '\r\n']trim_blocks: boolvariable_end_string: strvariable_start_string: str
class semantic_release.cli.config.ChangelogOutputFormat
class semantic_release.cli.config.ChangelogOutputFormat(*values)
Bases: str, Enum
Supported changelog output formats when using the default templates. ๐
MARKDOWN = 'md'NONE = ''RESTRUCTURED_TEXT = 'rst'
class semantic_release.cli.config.DefaultChangelogTemplatesConfig
class semantic_release.cli.config.DefaultChangelogTemplatesConfig(*, changelog_file: str = 'CHANGELOG.md', output_format: ChangelogOutputFormat = ChangelogOutputFormat.NONE, mask_initial_release: bool = True)
Bases: BaseModel
changelog_file: strinterpret_output_format() -> Selfmask_initial_release: boolmodel_config = {}โ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].output_format: ChangelogOutputFormat
class semantic_release.cli.config.EnvConfigVar
class semantic_release.cli.config.EnvConfigVar(*, env: str, default: str | None = None, default_env: str | None = None)
Bases: BaseModel
default: str | Nonedefault_env: str | Noneenv: strgetvalue() -> str | Nonemodel_config = {}โ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
class semantic_release.cli.config.GlobalCommandLineOptions
class semantic_release.cli.config.GlobalCommandLineOptions(noop: bool = False, verbosity: int = 0, config_file: str = 'pyproject.toml', strict: bool = False)
Bases: object
A dataclass to hold all the command line options that should be set in the RuntimeContext. look at it. holding all the options. carrying the whole team on its back ๐ซถ
config_file: str = 'pyproject.toml'noop: bool = Falsestrict: bool = Falseverbosity: int = 0
class semantic_release.cli.config.HvcsClient
class semantic_release.cli.config.HvcsClient(*values)
Bases: str, Enum
BITBUCKET = 'bitbucket'GITEA = 'gitea'GITHUB = 'github'GITLAB = 'gitlab'
class semantic_release.cli.config.PublishConfig
class semantic_release.cli.config.PublishConfig(*, dist_glob_patterns: Tuple[str, ...] = ('dist/*',), upload_to_vcs_release: bool = True)
Bases: BaseModel
dist_glob_patterns: Tuple[str, ...]model_config = {}โ Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].upload_to_vcs_release: bool
class semantic_release.cli.config.RawConfig(*, assets: List[str] = [], branches: Dict[str, ~semantic_release.cli.config.BranchConfig]={'main': BranchConfig(match='(main|master)', prerelease_token='rc', prerelease=False)}, build_command: str | None = None, build_command_env: List[str] = [], changelog: ChangelogConfig <#semantic_release.cli.config.ChangelogConfig> = ChangelogConfig(changelog_file='', default_templates=DefaultChangelogTemplatesConfig(changelog_file='CHANGELOG.md', output_format=<ChangelogOutputFormat.MARKDOWN: 'md'>, mask_initial_release=True), environment=ChangelogEnvironmentConfig(block_start_string='{%', block_end_string='%}', variable_start_string='{{', variable_end_string='}}', comment_start_string='{#', comment_end_string='#}', line_statement_prefix=None, line_comment_prefix=None, trim_blocks=False, lstrip_blocks=False, newline_sequence='\n', keep_trailing_newline=False, extensions=(), autoescape=False), exclude_commit_patterns=(), mode=<ChangelogMode.UPDATE: 'update'>, insertion_flag='<!-- version list -->', template_dir='templates'), commit_author: EnvConfigVar <#semantic_release.cli.config.EnvConfigVar> | str = EnvConfigVar(env='GIT_COMMIT_AUTHOR', default='semantic-release <semantic-release>', default_env=None), commit_message: str = '{version}\n\nAutomatically generated by python-semantic-release', commit_parser: Annotated[str, ~annotated_types.MinLen(min_length=1)] = 'conventional', commit_parser_options: Dict[str, ~typing.Any]={}, logging_use_named_masks: bool = False, major_on_zero: bool = True, allow_zero_version: bool = False, repo_dir: Path = '.', remote: RemoteConfig <#semantic_release.cli.config.RemoteConfig> = RemoteConfig(name='origin', token=None, url=None, type=<HvcsClient.GITHUB: 'github'>, domain=None, api_domain=None, ignore_token_for_push=False, insecure=False), no_git_verify: bool = False, tag_format: str = 'v{version}', add_partial_tags: bool = False, publish: PublishConfig <#semantic_release.cli.config.PublishConfig> = PublishConfig(dist_glob_patterns=('dist/*', ), upload_to_vcs_release=True), version_toml: Tuple[str, ...] | None=None, version_variables: Tuple[str, ...] | None=None)
Bestie. Look at that signature. It's giving everything, everywhere, all at once ๐ and honestly? We respect it.
Bases: BaseModel
So here's the vibe of RawConfig โ it's the raw, straight-off-the-disk pile of config, before anything gets resolved or dressed up. And it comes with all of this:
add_partial_tags: boolallow_zero_version: boolclassmethod angular_commit_parser_deprecation_warning(val: str) -> strassets: List[str]branches: Dict[str, BranchConfig <#semantic_release.cli.config.BranchConfig>]build_command: str | Nonebuild_command_env: List[str]changelog: ChangelogConfig <#semantic_release.cli.config.ChangelogConfig>commit_author: MaybeFromEnvcommit_message: strcommit_parser: NonEmptyStringcommit_parser_options: Dict[str, Any]classmethod convert_str_to_path(value: Any) -> Pathlogging_use_named_masks: boolmajor_on_zero: boolmodel_config = {}โ this one is literally the config for the model itself, and it should be a dictionary that conforms to[ConfigDict][pydantic.config.ConfigDict]. Nested config for your config, iykyk ๐no_git_verify: boolpublish: PublishConfig <#semantic_release.cli.config.PublishConfig>remote: RemoteConfig <#semantic_release.cli.config.RemoteConfig>classmethod remove_whitespace(val: list[str]) -> list[str]repo_dir: Pathset_default_opts() -> Selfclassmethod tag_commit_parser_deprecation_warning(val: str) -> strtag_format: strclassmethod verify_git_repo_dir(dir_path: Path) -> Pathversion_toml: Tuple[str, ...] | Noneversion_variables: Tuple[str, ...] | None
class semantic_release.cli.config.RemoteConfig(*, name: str = 'origin', token: str | None = None, url: str | None = None, type: HvcsClient <#semantic_release.cli.config.HvcsClient> = HvcsClient.GITHUB, domain: str | None = None, api_domain: str | None = None, ignore_token_for_push: bool = False, insecure: bool = False)
Bases: BaseModel
This is the one that knows where your code actually lives, bestie โ the remote. Its little family of members:
api_domain: str | Nonecheck_insecure_flag(url_str: str, field_name: str) -> Nonecheck_url_scheme() -> Selfdomain: str | Noneignore_token_for_push: boolinsecure: boolmodel_config = {}โ again, "Configuration for the model, should be a dictionary conforming to[ConfigDict][pydantic.config.ConfigDict]." Same energy, different model ๐ซถname: strclassmethod resolve_env_vars(val: Any) -> str | Noneset_default_token() -> Selftoken: str | Nonetype: HvcsClient <#semantic_release.cli.config.HvcsClient>url: str | None
class semantic_release.cli.config.RuntimeContext(project_metadata: 'dict[str, Any]', repo_dir: 'Path', commit_parser: 'CommitParser[ParseResult, ParserOptions]', version_translator: 'VersionTranslator', major_on_zero: 'bool', allow_zero_version: 'bool', prerelease: 'bool', no_git_verify: 'bool', assets: 'List[str]', commit_author: 'Actor', commit_message: 'str', changelog_excluded_commit_patterns: 'Tuple[Pattern[str], ...]', version_declarations: 'Tuple[IVersionReplacer, ...]', hvcs_client: 'hvcs.HvcsBase', changelog_insertion_flag: 'str', changelog_mask_initial_release: 'bool', changelog_mode: 'ChangelogMode', changelog_file: 'Path', changelog_style: 'str', changelog_output_format: 'ChangelogOutputFormat', ignore_token_for_push: 'bool', template_environment: 'Environment', template_dir: 'Path', build_command: 'Optional[str]', build_command_env: 'dict[str, str]', dist_glob_patterns: 'Tuple[str, ...]', upload_to_vcs_release: 'bool', global_cli_options: 'GlobalCommandLineOptions', masker: 'MaskingFilter')
Bases: object
And this is where the glow-up happens โ RawConfig goes in, a fully-formed RuntimeContext comes out the other side. Main character energy fr fr ๐
allow_zero_version: boolapply_log_masking(masker: MaskingFilter <#semantic_release.cli.masking_filter.MaskingFilter>) -> MaskingFilter <#semantic_release.cli.masking_filter.MaskingFilter>assets: List[str]build_command: str | Nonebuild_command_env: dict[str, str]changelog_excluded_commit_patterns: Tuple[Pattern[str], ...]changelog_file: Pathchangelog_insertion_flag: strchangelog_mask_initial_release: boolchangelog_mode: ChangelogMode <#semantic_release.changelog.context.ChangelogMode>changelog_output_format: ChangelogOutputFormat <#semantic_release.cli.config.ChangelogOutputFormat>changelog_style: strcommit_author: Actorcommit_message: strcommit_parser: CommitParser[ParsedCommit <#semantic_release.commit_parser.token.ParsedCommit> | ParseError <#semantic_release.commit_parser.token.ParseError>, ParserOptions]dist_glob_patterns: Tuple[str, ...]classmethod from_raw_config(raw: RawConfig <#semantic_release.cli.config.RawConfig>, global_cli_options: GlobalCommandLineOptions <#semantic_release.cli.config.GlobalCommandLineOptions>) -> RuntimeContext <#semantic_release.cli.config.RuntimeContext>โ the transformation moment โจglobal_cli_options: GlobalCommandLineOptions <#semantic_release.cli.config.GlobalCommandLineOptions>hvcs_client: HvcsBaseignore_token_for_push: boolmajor_on_zero: boolmasker: MaskingFilter <#semantic_release.cli.masking_filter.MaskingFilter>no_git_verify: boolprerelease: boolproject_metadata: dict[str, Any]repo_dir: Pathstatic resolve_from_env(param: EnvConfigVar <#semantic_release.cli.config.EnvConfigVar> | str | None) -> str | Nonestatic select_branch_options(choices: Dict[str, BranchConfig <#semantic_release.cli.config.BranchConfig>], active_branch: str) -> BranchConfig <#semantic_release.cli.config.BranchConfig>template_dir: Pathtemplate_environment: Environmentupload_to_vcs_release: boolversion_declarations: Tuple[IVersionReplacer <#semantic_release.version.declarations.i_version_replacer.IVersionReplacer>, ...]version_translator: VersionTranslator <#semantic_release.version.translator.VersionTranslator>
๐งฉ semantic_release.cli.const module
That's the whole module, bestie. It's a constants module and it's gonna keep its little secrets ๐
๐ semantic_release.cli.github_actions_output module
GitHub Actions output, so your workflow can actually hear what happened. Obsessed.
class semantic_release.cli.github_actions_output.PersistenceMode(*values)
Bases: Enum
The two moods of persistence:
PERMANENT = 'permanent'TEMPORARY = 'temporary'
class semantic_release.cli.github_actions_output.VersionGitHubActionsOutput(gh_client: Github <#semantic_release.hvcs.github.Github> | None = None, mode: PersistenceMode <#semantic_release.cli.github_actions_output.PersistenceMode> = PersistenceMode.PERMANENT, released: bool | None = None, version: Version <#semantic_release.version.version.Version> | None = None, commit_sha: str | None = None, release_notes: str | None = None, prev_version: Version <#semantic_release.version.version.Version> | None = None)
Bases: object
Everything it's got going on:
OUTPUT_ENV_VAR = 'GITHUB_OUTPUT'property commit_sha: str | Noneproperty gh_client: Github <#semantic_release.hvcs.github.Github>property is_prerelease: bool | Noneproperty prev_version: Version <#semantic_release.version.version.Version> | Noneproperty release_notes: str | Noneproperty released: bool | Noneproperty tag: str | Noneto_output_text() -> strproperty version: Version <#semantic_release.version.version.Version> | Nonewrite_if_possible(filename: str | None = None) -> None
๐ญ semantic_release.cli.masking_filter module
The module that keeps your secrets secrets, periodt. ๐
class semantic_release.cli.masking_filter.MaskingFilter(_use_named_masks: bool = False, **patterns: Iterable[str | re.Pattern[str]])
Bases: Filter
REPLACE_STR = '****'โ yes, four stars, tape over the goods ๐add_mask_for(data: str, name: str = 'redacted') -> MaskingFilter <#semantic_release.cli.masking_filter.MaskingFilter>filter(record: LogRecord) -> boolโ "Determine if the specified record is to be logged. ReturnsTrueif the record should be logged, orFalseotherwise. If deemed appropriate, the record may be modified in-place." So it's simultaneously the bouncer and the person who edits the guest list ๐ญmask(msg: str) -> str
๐ ๏ธ semantic_release.cli.util module
Utilities for command-line functionality โ the lil toolbox ๐งฐ
semantic_release.cli.util.indented(msg: str, prefix: str = ' ') -> str
Convenience function for text-formatting for the console. Just here to make things look pretty, which is honestly so valid of it ๐ธ
the least-indented line of the msg string gets a prefix slapped onto it, and then the rest of msg stays lined up all consistent and cute โ irrespective of how deep the indentation went in the Python source code. ๐
like it genuinely does not care how nested the source was, it just aligns. iconic.
semantic_release.cli.util.load_raw_config_file(config_file: Path | str) -> dict[Any, Any]
okay so this one lowkey just loads your raw configuration as a dict from the filename specified by config_filename, and it's gonna try these parsing methods in order:
- try to parse with
tomli.loadfirst (guessing it's a TOML file ๐) - then try to parse with
json.load(guessing it's a JSON file โจ) - and if neither of those work? raise
InvalidConfiguration, periodt ๐
btw bestie, this function will also raise FileNotFoundError if that gets raised while it's trying to read the configuration file you specified. ๐ don't say I didn't warn you.
semantic_release.cli.util.noop_report(msg: str) -> None
Rich-prints a msg with a standard prefix, so it can report when an action is not being taken because of a "noop" flag. ๐ซถ
semantic_release.cli.util.parse_toml(raw_text: str) -> dict[Any, Any]
attempts to parse raw configuration for semantic_release using tomlkit.loads, raising InvalidConfiguration if the TOML is invalid โ or if there's no top level "semantic_release" or "tool.semantic_release" keys. ๐
semantic_release.cli.util.rprint(msg: str) -> None
Rich-prints to stderr so that redirecting your command output doesn't get all cluttered. ๐ slay.
semantic_release.commit_parser package
Subpackages
semantic_release.commit_parser.conventional package
Submodules
semantic_release.commit_parser.conventional.options module
class semantic_release.commit_parser.conventional.options.ConventionalCommitParserOptions(minor_tags: Tuple[str, ...] = ('feat',), patch_tags: Tuple[str, ...] = ('fix', 'perf'), other_allowed_tags: Tuple[str, ...] = ('build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test'), allowed_tags: Tuple[str, ...] = ('feat', 'fix', 'perf', 'build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test'), default_bump_level: LevelBump <#semantic_release.enums.LevelBump> = LevelBump.NO_RELEASE, parse_squash_commits: bool = True, ignore_merge_commits: bool = True)
Bases: ParserOptions
Options dataclass for the ConventionalCommitParser. ๐
allowed_tags: Tuple[str, ...] = ('feat', 'fix', 'perf', 'build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test')โ every commit-type prefix that's allowed. these are the ones used to identify a valid commit message. and if a commit message doesn't start with one of these prefixes? it's not getting considered a valid commit message, bestie. that's just how it is. ๐default_bump_level: LevelBump <#semantic_release.enums.LevelBump> = 0โ the minimum bump level to apply to a valid commit message. ๐ignore_merge_commits: bool = Trueโ toggle flag for whether or not to ignore merge commits. ๐ซถminor_tags: Tuple[str, ...] = ('feat',)โ commit-type prefixes that should result in a minor release bump. โจother_allowed_tags: Tuple[str, ...] = ('build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test')โ commit-type prefixes that are allowed but don't result in a version bump. so they're valid, they just don't move the number. no cap. ๐parse_squash_commits: bool = Trueโ toggle flag for whether or not to parse squash commits. ๐patch_tags: Tuple[str, ...] = ('fix', 'perf')โ commit-type prefixes that should result in a patch release bump. ๐property tag_to_level: dict[str, LevelBump <#semantic_release.enums.LevelBump>]โ a mapping of commit tags to the level bump they should result in. like a little lookup table, and honestly? obsessed. ๐ธ
semantic_release.commit_parser.conventional.options_monorepo module
class semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions(minor_tags: Tuple[str, ...] = ('feat',), patch_tags: Tuple[str, ...] = ('fix', 'perf'), other_allowed_tags: Tuple[str, ...] = ('build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test'), allowed_tags: Tuple[str, ...] = ('feat', 'fix', 'perf', 'build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test'), default_bump_level: LevelBump <#semantic_release.enums.LevelBump> = LevelBump.NO_RELEASE, parse_squash_commits: bool = True, ignore_merge_commits: bool = True, path_filters: Annotated[Tuple[str, ...], Field(validate_default=True)] = ('.',), scope_prefix: str = '')
Bases: ConventionalCommitParserOptions <#semantic_release.commit_parser.conventional.options.ConventionalCommitParserOptions>
Options dataclass for ConventionalCommitMonorepoParser. ๐
classmethod convert_strs_to_paths(value: Any) -> tuple[str, ...]
path_filters: Annotated[Tuple[str, ...], FieldInfo(annotation=NoneType, required=True, validate_default=True)] = ('.',)โ a set of relative paths to filter commits by. only commits with file changes that match these file paths or its subdirectories will be considered valid commits. ๐
the syntax is similar to .gitignore, with file path globs and inverse file match globs via the ! prefix. paths should be relative to the current working directory. ๐
classmethod resolve_path(dir_path_strs: tuple[str, ...]) -> tuple[str, ...]
scope_prefix: str = ''โ a prefix that will be striped from the scope when parsing commit messages.
if set, it will cause unscoped commits to be ignored. use this in tandem with the path_filters option to filter commits by directory and scope. and heads up bestie โ this gets fed into a regular expression, so you must escape any special characters that are meaningful in regular expressions (e.g. ., *, ?, +, etc.) if you want to match them literally. ๐ that's a big deal, don't skip it.
classmethod validate_scope_prefix(scope_prefix: str) -> str
semantic_release.commit_parser.conventional.parser module
class semantic_release.commit_parser.conventional.parser.ConventionalCommitParser(options: ConventionalCommitParserOptions <#semantic_release.commit_parser.conventional.options.ConventionalCommitParserOptions> | None = None)
Bases: CommitParser[ParsedCommit <#semantic_release.commit_parser.token.ParsedCommit> | ParseError <#semantic_release.commit_parser.token.ParseError>, ConventionalCommitParserOptions <#semantic_release.commit_parser.conventional.options.ConventionalCommitParserOptions>]
a commit parser for projects conforming to the conventional commits specification. โจ
see <https://www.conventionalcommits.org/en/v1.0.0/> โ go read it, bestie, fr fr.
commit_body_components_separator(accumulator: dict[str, list[str]], text: str) -> dict[str, list[str]]
common_commit_msg_filters: ClassVar[dict[str, tuple[Pattern[str], str]]] = {'git-header-author': (re.compile('^[\\t ]*Author: .+$\\n?', re.MULTILINE), ''), 'git-header-commit': (re.compile('^[\\t ]*commit [0-9a-f]+$\\n?', re.MULTILINE), ''), 'git-header-date': (re.compile('^[\\t ]*Date: .+$\\n?', re.MULTILINE), ''), 'git-squash-heading': (re.compile('^[\\t ]*Squashed commit of the following:.*$\\n?', re.MULTILINE), ''), 'typo-extra-spaces': (re.compile('(\\S) +(\\S)'), '\\1 \\2')}
create_parsed_message_result(match: Match[str]) -> ParsedMessageResult <#semantic_release.commit_parser.token.ParsedMessageResult>
get_default_options() -> ConventionalCommitParserOptions <#semantic_release.commit_parser.conventional.options.ConventionalCommitParserOptions>
static is_merge_commit(commit: Commit) -> bool
issue_selector = re.compile('^(?:clos(?:e|es|ed|ing)|fix(?:es|ed|ing)?|resolv(?:e|es|ed|ing)|implement(?:s|ed|ing)?):[\\t ]+(?P<issue_predicate>.+)[\\t ]*$', re.IGNORECASE|re.MULTILINE)
log_parse_error(commit: Commit, error: str) -> ParseError <#semantic_release.commit_parser.token.ParseError>
mr_selector = re.compile('[\\t ]+\\((?:pull request )?(?P<mr_number>[#!]\\d+)\\)[\\t ]*$')
notice_selector = re.compile('^NOTICE: (?P<notice>.+)$')
parse(commit: Commit) -> ParsedCommit <#semantic_release.commit_parser.token.ParsedCommit> | ParseError <#semantic_release.commit_parser.token.ParseError> | list[ParsedCommit <#semantic_release.commit_parser.token.ParsedCommit> | ParseError <#semantic_release.commit_parser.token.ParseError>] โ parse a commit message.
if the commit message is a squashed merge commit, it will be split into multiple commits, each of which gets parsed separately. single commits will be returned as a list of a single ParseResult. ๐
parse_commit(commit: Commit) -> ParsedCommit <#semantic_release.commit_parser.token.ParsedCommit> | ParseError <#semantic_release.commit_parser.token.ParseError>
parse_message(message: str) -> ParsedMessageResult <#semantic_release.commit_parser.token.ParsedMessageResult> | None
parser_options โ alias of ConventionalCommitParserOptions <#semantic_release.commit_parser.conventional.options.ConventionalCommitParserOptions>
unsquash_commit(commit: Commit) -> list[Commit]
unsquash_commit_message(message: str) -> list[str]
semantic_release.commit_parser.conventional.parser_monorepo module
class semantic_release.commit_parser.conventional.parser_monorepo.ConventionalCommitMonorepoParser(options: ConventionalCommitMonorepoParserOptions <#semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions> | None = None)
Bases: CommitParser[ParsedCommit <#semantic_release.commit_parser.token.ParsedCommit> | ParseError <#semantic_release.commit_parser.token.ParseError>, ConventionalCommitMonorepoParserOptions <#semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions>]
get_default_options() -> ConventionalCommitMonorepoParserOptions <#semantic_release.commit_parser.conventional.options_monorepo.ConventionalCommitMonorepoParserOptions>
logged_parse_error(commit: Commit, error: str) -> ParseError <#semantic_release.commit_parser.token.ParseError>
parse(commit: Commit) -> ParseResult | list[ParseResult]
parse_commit(commit: Commit) -> ParseResultโ bestie, it literally tries to parse that commit message with a regular expression and hands you back aParseResult. that's it, that's the whole job ๐parse_message(message: str, strict_scope: bool = False) -> ParsedMessageResult | Noneโ same energy but for a raw string; returnsParsedMessageResultorNoneif it can't vibe with it ๐parser_optionsโ alias ofConventionalCommitMonorepoParserOptions, iykyk ๐unsquash_commit_message(message: str) -> list[str]โ un-squashes the message into alist[str], no biggie โจ
๐ฆ Submodules
๐ semantic_release.commit_parser.angular module
okay so this one is the Angular commit style parser, and the docs point you at https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines if you wanna read the source of truth ๐
class semantic_release.commit_parser.angular.AngularCommitParser(
options: AngularParserOptions | None = None
)
Bases: CommitParser[ParsedCommit | ParseError, AngularParserOptions]
A commit parser for projects that are conforming to the angular style of conventional commits. go look at https://www.conventionalcommits.org/en/v1.0.0-beta.4/ for the receipts ๐ฅ
commit_body_components_separator(accumulator: dict[str, list[str]], text: str) -> dict[str, list[str]]โ splits the body components up into that accumulator dict, periodt.static get_default_options() -> AngularParserOptionsโ hands you the default options object.static is_merge_commit(commit: Commit) -> boolโ yes/no, is it a merge commit ๐คparse(commit: Commit) -> ParsedCommit | ParseError | list[ParsedCommit | ParseError]โ Parse a commit message.
So the tea is: if the commit message is a squashed merge commit, it will be split into multiple commits, and each of those gets parsed separately. Single commits come back as a list of a single ParseResult. no cap ๐ซถ
parse_commit(commit: Commit) -> ParsedCommit | ParseErrorโ parses exactly one commit, one and done.parse_message(message: str) -> ParsedMessageResult | Noneโ parses a message string, returnsParsedMessageResultorNone.parser_optionsโ alias ofAngularParserOptions๐unsquash_commit(commit: Commit) -> list[Commit]โ un-squashes a commit into alist[Commit].unsquash_commit_message(message: str) -> list[str]โ un-squashes a message into alist[str].
๐ธ semantic_release.commit_parser.angular.AngularParserOptions
class semantic_release.commit_parser.angular.AngularParserOptions(
minor_tags: Tuple[str, ...] = ('feat',),
patch_tags: Tuple[str, ...] = ('fix', 'perf'),
other_allowed_tags: Tuple[str, ...] = (
'build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test'
),
allowed_tags: Tuple[str, ...] = (
'feat', 'fix', 'perf', 'build', 'chore', 'ci', 'docs', 'style',
'refactor', 'test'
),
default_bump_level: LevelBump = LevelBump.NO_RELEASE,
parse_squash_commits: bool = False,
ignore_merge_commits: bool = False
)
Bases: ParserOptions
Options dataclass for AngularCommitParser. she's a whole vibe โจ
allowed_tags: Tuple[str, ...] = ('feat', 'fix', 'perf', 'build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test')โ All commit-type prefixes that are allowed.
These are used to identify a valid commit message. bestie, if a commit message does not start with one of these prefixes, it will not be considered a valid commit message. rude but fair ๐
default_bump_level: LevelBump = 0โ The minimum bump level to apply to valid commit message.ignore_merge_commits: bool = Falseโ Toggle flag for whether or not to ignore merge commits.minor_tags: Tuple[str, ...] = ('feat',)โ Commit-type prefixes that should result in a minor release bump.other_allowed_tags: Tuple[str, ...] = ('build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test')โ Commit-type prefixes that are allowed but do not result in a version bump. they're just here for the vibes ๐งparse_squash_commits: bool = Falseโ Toggle flag for whether or not to parse squash commits.patch_tags: Tuple[str, ...] = ('fix', 'perf')โ Commit-type prefixes that should result in a patch release bump.property tag_to_level: dict[str, LevelBump]โ A mapping of commit tags to the level bump they should result in. a little lookup table, iconic ๐
๐ semantic_release.commit_parser.emoji module
Commit parser which looks for emojis to determine the type of commit. yes, literally emojis, we love her ๐ญ๐
class semantic_release.commit_parser.emoji.EmojiCommitParser(
options: EmojiParserOptions | None = None
)
Bases: CommitParser[ParsedCommit | ParseError, EmojiParserOptions]
Parse a commit using an emoji in the subject line. When multiple emojis are encountered, the one with the highest bump level is used. If there are multiple emojis on the same level, the we use the one listed earliest in the configuration. If the message does not contain any known emojis, then the level to bump will be 0 and the type of change "Other". This parser never raises UnknownCommitMessageStyleError. Emojis are not removed from the description, and will appear alongside the commit subject in the changelog. so cute, so functional ๐
commit_body_components_separator(accumulator: dict[str, list[str]], text: str) -> dict[str, list[str]]โ separates body components into that accumulator.static get_default_options() -> EmojiParserOptionsโ the defaults, served fresh.static is_merge_commit(commit: Commit) -> boolโ is it a merge commit, yes or no ๐parse(commit: Commit) -> ParsedCommit | ParseError | list[ParsedCommit | ParseError]โ Parse a commit message.
Again bestie: if the commit message is a squashed merge commit, it will be split into multiple commits, each of which will be parsed separately. Single commits will be returned as a list of a single ParseResult. ๐ฅ
parse_commit(commit: Commit) -> ParsedCommit | ParseErrorโ one commit, parsed.parse_message(message: str) -> ParsedMessageResultโ parses a message string into aParsedMessageResult.parser_optionsโ alias ofEmojiParserOptions๐unsquash_commit(commit: Commit) -> list[Commit]โ un-squashes a commit into alist[Commit].unsquash_commit_message(message: str) -> list[str]โ un-squashes a message into alist[str].
๐ semantic_release.commit_parser.emoji.EmojiParserOptions
class semantic_release.commit_parser.emoji.EmojiParserOptions(
major_tags: Tuple[str, ...] = (':boom:',),
minor_tags: Tuple[str, ...] = (
':sparkles:', ':children_crossing:', ':lipstick:', ':iphone:', ':egg:',
':chart_with_upwards_trend:'
),
patch_tags: Tuple[str, ...] = (
':ambulance:', ':lock:', ':bug:', ':zap:', ':goal_net:', ':alien:',
':wheelchair:', ':speech_balloon:', ':mag:', ':apple:', ':penguin:',
':checkered_flag:', ':robot:', ':green_apple:'
),
other_allowed_tags: Tuple[str, ...] = (
':checkmark:', ':construction_worker:', ':memo:', ':recycle:'
),
allowed_tags: Tuple[str, ...] = (
':boom:', ':sparkles:', ':children_crossing:', ':lipstick:', ':iphone:',
':egg:', ':chart_with_upwards_trend:', ':ambulance:', ':lock:', ':bug:',
':zap:', ':goal_net:', ':alien:', ':wheelchair:', ':speech_balloon:',
':mag:', ':apple:', ':penguin:', ':checkered_flag:', ':robot:',
':green_apple:', ':checkmark:', ':construction_worker:', ':memo:',
':recycle:'
),
default_bump_level: LevelBump = LevelBump.NO_RELEASE,
parse_linked_issues: bool = False,
parse_squash_commits: bool = True,
ignore_merge_commits: bool = True
)
Bases: ParserOptions
Options dataclass for EmojiCommitParser. and every single one of these is a real emoji shortcode, we're so serious ๐ธ
allowed_tags: Tuple[str, ...] = (':boom:', ':sparkles:', ':children_crossing:', ':lipstick:', ':iphone:', ':egg:', ':chart_with_upwards_trend:', ':ambulance:', ':lock:', ':bug:', ':zap:', ':goal_net:', ':alien:', ':wheelchair:', ':speech_balloon:', ':mag:', ':apple:', ':penguin:', ':checkered_flag:', ':robot:', ':green_apple:', ':checkmark:', ':construction_worker:', ':memo:', ':recycle:')โ All commit-type prefixes that are allowed.default_bump_level: LevelBump = 0โ The minimum bump level to apply to valid commit message.ignore_merge_commits: bool = Trueโ Toggle flag for whether or not to ignore merge commits. note that here it starts asTrue, unlike her angular sister ๐major_tags: Tuple[str, ...] = (':boom:',)โ Commit-type prefixes that should result in a major release bump. ๐ฅminor_tags: Tuple[str, ...] = (':sparkles:', ':children_crossing:', ':lipstick:', ':iphone:', ':egg:', ':chart_with_upwards_trend:')โ Commit-type prefixes that should result in a minor release bump.other_allowed_tags: Tuple[str, ...] = (':checkmark:', ':construction_worker:', ':memo:', ':recycle:')โ Commit-type prefixes that are allowed but do not result in a version bump. no bump, all vibes ๐ซถparse_linked_issues: bool = Falseโ Whether to parse linked issues from the commit message.
Issue identification is not defined in the Gitmoji specification, so this parser will not attempt to parse issues by default. If enabled, the parser will use the same identification as GitHub, GitLab, and BitBucket use for linking issues, which is to look for a git commit message footer starting with "Closes:", "Fixes:", or "Resolves:" then a space, and then the issue identifier. The line prefix can be singular or plural and it is not case-sensitive but must have a colon and a whitespace separator.
parse_squash_commits: bool = Trueโ lil toggle flag, bestie: do we parse squash commits, or nah? ๐ซถpatch_tags: Tuple[str, ...]โ the commit-type prefixes that should get you a patch release bump. And yes, they're literally all emoji, no cap:
(':ambulance:', ':lock:', ':bug:', ':zap:', ':goal_net:', ':alien:', ':wheelchair:', ':speech_balloon:', ':mag:', ':apple:', ':penguin:', ':checkered_flag:', ':robot:', ':green_apple:')
property tag_to_level: dict[str, LevelBump]โ a mapping of commit tags to the level bump they should result in. simple as that ๐
๐ semantic_release.commit_parser.scipy module ๐ฆ
Okay so this one parses commit messages using scipy tags (<scipy-style>) and the format is literally:
<tag>(<scope>): <subject>
<body>
The elements <tag>, <scope> and <body> are optional, iykyk. If there's no tag present at all, the commit gets dropped into the changelog section "None" and no version increment will be performed. periodt.
Now โ while <scope> is supported here, bestie, it isn't actually part of the scipy style. And if it's missing, the parentheses around it are too. So the commit should then be of the form:
<tag>: <subject>
<body>
To communicate a breaking change, add "BREAKING CHANGE" into the body at the beginning of a paragraph. Fill that paragraph with info on how to migrate from the broken behavior to the new behavior ๐ and it'll be added to the "Breaking" section of the changelog.
Supported Tags:
(
API,
DEP,
ENH,
REV,
BUG,
MAINT,
BENCH,
BLD,
)
DEV, DOC, STY, TST, REL, FEAT, TEST
Supported Changelog Sections:
breaking, feature, fix, Other, None
โจ ScipyCommitParser
class semantic_release.commit_parser.scipy.ScipyCommitParser(options: ScipyParserOptions | None = None)
Bases: CommitParser[ParsedCommit | ParseError, ScipyParserOptions]
Parser for scipy-style commit messages, slay ๐
commit_body_components_separator(accumulator: dict[str, list[str]], text: str) -> dict[str, list[str]]static get_default_options() -> ScipyParserOptionsstatic is_merge_commit(commit: Commit) -> boolparse(commit: Commit) -> ParsedCommit | ParseError | list[ParsedCommit | ParseError]โ Parse a commit message. If the commit message is a squashed merge commit, it will be split into multiple commits, each of which will be parsed separately. Single commits will be returned as a list of a singleParseResult. fr fr, that's the vibe ๐parse_commit(commit: Commit) -> ParsedCommit | ParseErrorparse_message(message: str) -> ParsedMessageResult | Noneparser_optionsโ alias ofScipyParserOptionsunsquash_commit(commit: Commit) -> list[Commit]unsquash_commit_message(message: str) -> list[str]
๐ ScipyParserOptions
class semantic_release.commit_parser.scipy.ScipyParserOptions(
major_tags: Tuple[str, ...] = ('API', 'DEP'),
minor_tags: Tuple[str, ...] = ('ENH', 'FEAT'),
patch_tags: Tuple[str, ...] = ('BLD', 'BUG', 'MAINT'),
other_allowed_tags: Tuple[str, ...] = ('DEV', 'BENCH', 'DOC', 'STY', 'TST', 'REL', 'TEST'),
allowed_tags: Tuple[str, ...] = ('API', 'DEP', 'ENH', 'FEAT', 'BLD', 'BUG', 'MAINT', 'DEV', 'BENCH', 'DOC', 'STY', 'TST', 'REL', 'TEST'),
default_level_bump: LevelBump = LevelBump.NO_RELEASE,
parse_squash_commits: bool = True,
ignore_merge_commits: bool = True,
)
Bases: ParserOptions
Options dataclass for ScipyCommitParser.
Scipy-style commit messages follow the same format as Angular-style commit just with different tag names. cute right? ๐ธ
allowed_tags: Tuple[str, ...] = ('API', 'DEP', 'ENH', 'FEAT', 'BLD', 'BUG', 'MAINT', 'DEV', 'BENCH', 'DOC', 'STY', 'TST', 'REL', 'TEST')โ All commit-type prefixes that are allowed. These are used to identify a valid commit message. If a commit message does not start with one of these prefixes, it will not be considered a valid commit message. rude but true ๐default_level_bump: LevelBump = 0โ The minimum bump level to apply to valid commit message.ignore_merge_commits: bool = Trueโ Toggle flag for whether or not to ignore merge commitsmajor_tags: Tuple[str, ...] = ('API', 'DEP')โ Commit-type prefixes that should result in a major release bump.minor_tags: Tuple[str, ...] = ('ENH', 'FEAT')โ Commit-type prefixes that should result in a minor release bump.other_allowed_tags: Tuple[str, ...] = ('DEV', 'BENCH', 'DOC', 'STY', 'TST', 'REL', 'TEST')โ Commit-type prefixes that are allowed but do not result in a version bump. morally neutral โจparse_squash_commits: bool = Trueโ Toggle flag for whether or not to parse squash commitspatch_tags: Tuple[str, ...] = ('BLD', 'BUG', 'MAINT')โ Commit-type prefixes that should result in a patch release bump.property tag_to_level: dict[str, LevelBump]โ A mapping of commit tags to the level bump they should result in.
๐ท๏ธ semantic_release.commit_parser.tag module ๐ฐ๏ธ
Legacy commit parser from Python Semantic Release 1.0. the ancestral tea โ
TagCommitParser
class semantic_release.commit_parser.tag.TagCommitParser(options: _OPTS | None = None)
Bases: CommitParser[ParsedCommit | ParseError, TagParserOptions]
Parse a commit message according to the 1.0 version of python-semantic-release. It expects a tag of some sort in the commit message and will use the rest of the first line as changelog content. old money energy ๐
static get_default_options() -> TagParserOptionsparse(commit: Commit) -> ParsedCommit | ParseError | list[ParsedCommit | ParseError]parser_optionsโ alias ofTagParserOptions
TagParserOptions
class semantic_release.commit_parser.tag.TagParserOptions(
minor_tag: str = ':sparkles:',
patch_tag: str = ':nut_and_bolt:',
)
Bases: ParserOptions
minor_tag: str = ':sparkles:'patch_tag: str = ':nut_and_bolt:'
๐๏ธ semantic_release.commit_parser.token module ๐
๐ ParseError
class semantic_release.commit_parser.token.ParseError(commit: Commit, error: str)
Bases: NamedTuple
A read-only named tuple object representing an error that occurred while parsing a commit message. the little "oop" package ๐ญ
commit: Commitโ The original commit object (a class defined by GitPython) that was parsederror: strโ A string with a description for why the commit parsing failed.property hexsha: strโ A hex representation of the hash value of the commit. This is a pass through property for convience to access thehexshaattribute of the commit.is_merge_commit() -> boolproperty message: strโ A string representation of the commit message. This is a pass through property for convience to access themessageattribute of the commit object. If the message is of typebytesthen it will be decoded to a UTF-8 string.raise_error() -> NoReturnโ A convience method to raise aCommitParseErrorwith the error message.property short_hash: strโ A short representation of the hash value (in hex) of the commit.
๐ ParsedCommit
class semantic_release.commit_parser.token.ParsedCommit(
bump: LevelBump,
type: str,
scope: str,
descriptions: list[str],
breaking_descriptions: list[str],
commit: Commit,
release_notices: tuple[str, ...] = (),
linked_issues: tuple[str, ...] = (),
linked_merge_request: str = '',
include_in_changelog: bool = True,
)
Bases: NamedTuple
A read-only named tuple object representing the result of parsing a commit message. the whole point of the operation, bestie โจ
breaking_descriptions: list[str]โ A list of paragraphs which are deemed to identify and describe breaking changes by the parser. An example would be a paragraph which begins with the textBREAKING CHANGE:in the commit message but the parser gennerally strips the prefix and includes the rest of the paragraph in this list.bump: LevelBumpโ ALevelBumpenum value indicating what type of change this commit introduces.commit: Commitโ The original commit object (a class defined by GitPython) that was parseddescriptions: list[str]โ A list of paragraphs from the commit message. Paragraphs are generally delimited by a double-newline since git commit messages are sometimes manually wordwrapped with a single newline, but this is up to the parser to implement.static from_parsed_message_result(commit: Commit, parsed_message_result: ParsedMessageResult) -> ParsedCommitโ A convience method to create aParsedCommitobject from aParsedMessageResultobject and aCommitobject.property hexsha: strโ the hash value of the commit, but hex-ified ๐
Basically a lil pass-through property, there for your convenience so you can grab the hexsha attribute right off the commit object without doing parkour. ๐ซถ
include_in_changelog: boolโ a yes/no flag saying whether this commit deserves a spot in the changelog โจ
This is the whole reason parsers can flag commits that aren't user-facing (or are justโฆ irrelevant, no shade) so that PSR's internal algorithms can filter them out. Bye bestie ๐
is_merge_commit() -> boollinked_issues: tuple[str, ...]โ a tuple of issue numbers as strings, if the commit has issue references in it ๐
If there are no issue references, this should be an empty tuple. And even though we all call them "issue numbers", it should generally be a string so it can keep the prefixes used by the VCS (like # for GitHub, GitLab, etc.) or by the issue tracker (JIRA uses AAA-###, iykyk). ๐
linked_merge_request: strโ a pull request or merge request definition, if the commit is labeled with a pull/merge request number ๐ธ
It's a string value that includes any special character prefix used by the VCS (e.g. # for GitHub, ! for GitLab).
property linked_pull_request: strโ literally just an alias to thelinked_merge_requestattribute, that's it, that's the whole thing ๐property message: strโ a string version of the commit message โจ
Another pass-through property, here for convenience so you can access the message attribute of the commit object directly.
And if the message happens to be of type bytes, it gets decoded to a UTF-8 string. slay ๐ฅ
release_notices: tuple[str, ...]โ a tuple of release notices, which are extra info about the changes that affect the user ๐
Example: a paragraph that starts with the text NOTICE: in the commit message โ but the parser generally strips that prefix and drops the rest of the paragraph into this list. ๐
scope: strโ the scope, as a string, parsed from the commit ๐ฆ
It's generally an optional field based on the commit message style, which means it very likely can be an empty string. Commit styles that don't have a meaningful concept of "scope" usually just fill this with an empty string and move on. ๐
property short_hash: strโ a short representation of the hash value (in hex) of the commit โจtype: strโ the type of the commit as a string, per the commit message style ๐
This one is up to the parser to implement โ for example, the EmojiCommitParser parser fills this field with the emoji representing the most significant change for the commit. Iconic behavior honestly ๐
class semantic_release.commit_parser.token.ParsedMessageResult(bump: LevelBump <#semantic_release.enums.LevelBump>, type: str, category: str, scope: str, descriptions: tuple[str, ...], breaking_descriptions: tuple[str, ...] = (), release_notices: tuple[str, ...] = (), linked_issues: tuple[str, ...] = (), linked_merge_request: str = '', include_in_changelog: bool = True)
Bases: NamedTuple ๐
A read-only named tuple object representing the result from parsing a commit message โจ
Basically it's a data structure that holds all the parsed info from a commit message without the actual commit object itself. Super helpful for unit testing, fr fr ๐ง
Most of the fields will replicate the fields of a ParsedCommit.
breaking_descriptions: tuple[str, ...]โ Alias for field number 5bump: LevelBump <#semantic_release.enums.LevelBump>โ Alias for field number 0category: strโ Alias for field number 2descriptions: tuple[str, ...]โ Alias for field number 4include_in_changelog: boolโ Alias for field number 9linked_issues: tuple[str, ...]โ Alias for field number 7linked_merge_request: strโ Alias for field number 8release_notices: tuple[str, ...]โ Alias for field number 6scope: strโ Alias for field number 3type: strโ Alias for field number 1
๐ semantic_release.commit_parser.util module
semantic_release.commit_parser.util.deep_copy_commit(commit: Commit) -> dict[str, Any]semantic_release.commit_parser.util.force_str(msg: str | bytes | bytearray | memoryview) -> strsemantic_release.commit_parser.util.parse_paragraphs(text: str) -> list[str]โ takes a text block and hands you back a list where each paragraph has its single line breaks collapsed into spaces ๐
To handle Windows line endings, carriage returns \r are removed before separating into paragraphs. ๐ช
It'll also try to detect Git footers, and those will not be condensed. ๐
Parameters
textโ the text string to be divided.
Returns
- A list of condensed paragraphs, as strings.
๐ฆ semantic_release.hvcs package
Submodules
โจ semantic_release.hvcs.bitbucket module
Helper code for interacting with a Bitbucket remote VCS ๐
class semantic_release.hvcs.bitbucket.Bitbucket(remote_url: str, *, hvcs_domain: str | None = None, hvcs_api_domain: str | None = None, token: str | None = None, allow_insecure: bool = False, **kwargs: Any)
Bases: RemoteHvcsBase <#semantic_release.hvcs.remote_hvcs_base.RemoteHvcsBase> ๐ซถ
Bitbucket HVCS interface for interacting with BitBucket repositories ๐ธ
This class supports the following products:
- BitBucket Cloud โ๏ธ
- BitBucket Data Center Server (on-premises installations) ๐
This interface does its best to detect which product is configured based on the domain you hand it. If it's the official bitbucket.org โ the default domain โ then it's treated as BitBucket Cloud, which uses the subdomain api.bitbucket.org/2.0 for api communication โจ
If the provided domain is anything else, then it's assumed you're talking to an on-premise or 3rd-party maintained BitBucket instance, which matches up with the BitBucket Data Center Server product. That on-prem server product uses a path prefix for handling api requests, configured to be server.domain/rest/api/1.0 based on the documentation from April 2024 ๐
DEFAULT_API_PATH_CLOUD = '/2.0'DEFAULT_API_PATH_ONPREM = '/rest/api/1.0'DEFAULT_API_SUBDOMAIN_PREFIX = 'api'DEFAULT_API_URL_CLOUD = 'https://api.bitbucket.org/2.0'DEFAULT_DOMAIN = 'bitbucket.org'DEFAULT_ENV_TOKEN_NAME = 'BITBUCKET_TOKEN'OFFICIAL_NAME = 'Bitbucket'commit_hash_url(commit_hash: str) -> strcompare_url(from_rev: str, to_rev: str) -> strโ get the Bitbucket comparison link between two version tags ๐:param from_rev:the older version to compare.:param to_rev:the newer version to compare.:return:link to view a comparison between the two versions. ๐ฅcreate_or_update_release(tag: str, release_notes: str, prerelease: bool = False) -> int | strโ create or update a release for the given tag in a remote VCS, attaching the given changelog if supported โจcreate_release(tag: str, release_notes: str, prerelease: bool = False, assets: list[str] | None = None, noop: bool = False) -> int | strโ create a release in a remote VCS, if supported ๐
Which includes uploading any assets as part of the release. ๐ฆ
static format_w_official_vcs_name(format_str: str) -> strget_changelog_context_filters() -> tuple[Callable[..., Any], ...]โ return a list of functions that can be used as filters in a Jinja2 template ๐ธ
ex. filters to convert text to URLs for issues and commits โจ
pull_request_url(pr_number: str | int) -> strremote_url(use_token: bool = True) -> strโ get the remote url including the token for authentication, if requested ๐upload_dists(tag: str, dist_glob: str) -> intโ upload built distributions to a release on a remote VCS that supports such uploads ๐ค
๐ธ semantic_release.hvcs.gitea module
Helper code for interacting with a Gitea remote VCS ๐ซถ
class semantic_release.hvcs.gitea.Gitea(remote_url: str, *, hvcs_domain: str | None = None, token: str | None = None, allow_insecure: bool = False, **_kwargs: Any)
Bases: RemoteHvcsBase <#semantic_release.hvcs.remote_hvcs_base.RemoteHvcsBase> ๐
Gitea helper class โจ
DEFAULT_API_PATH = '/api/v1'DEFAULT_DOMAIN = 'gitea.com'DEFAULT_ENV_TOKEN_NAME = 'GITEA_TOKEN'OFFICIAL_NAME = 'Gitea'asset_upload_url(release_id: str) -> strโ get the correct upload url for a release <https://gitea.com/api/swagger#/repository/repoCreateReleaseAttachment> ๐:param release_id:ID of the release to upload tocommit_hash_url(commit_hash: str) -> strcreate_or_update_release(tag: str, release_notes: str, prerelease: bool = False) -> intโ post release changelog ๐:param version:the version number.:param changelog:the release notes for this version.
Returns
- The status of the request ๐
create_release(tag: str, release_notes: str, prerelease: bool = False, assets: list[str] | None = None, noop: bool = False) -> intโ create a new release โจ
Ref: <https://gitea.com/api/swagger#/repository/repoCreateRelease> ๐ฅ
Parameters
tagโ tag to create release forrelease_notesโ the release notes for this versionprereleaseโ whether or not this release should be specified as a prerelease ๐ผ
Returns
- Whether the request succeeded ๐
create_release_url(tag: str = '') -> str
edit_release_notes(release_id: int, release_notes: str) -> int
Edits a release with the updated change notes bestie โ docs live at https://gitea.com/api/swagger#/repository/repoEditRelease
:param id:โ ID of release to update:param release_notes:โ The release notes for this version
Returns: the ID of the release that was edited
static format_w_official_vcs_name(format_str: str) -> str
โจ it's there, it's static, it's doing its thing. The docs give us no description and honestly? Respect. Moving on.
get_changelog_context_filters() -> tuple[Callable[..., Any], ...]
Gives you back a list of functions you can use as filters inside a Jinja2 template ๐
like, filters that turn text into URLs for issues and commits. very useful, very demure.
get_release_id_by_tag(tag: str) -> int | None
Grab a release by its tag name โ https://gitea.com/api/swagger#/repository/repoGetReleaseByTag
:param tag:โ Tag to get release for
Returns: ID of found release
issue_url(issue_num: str | int) -> str
no description given, just vibes ๐
pull_request_url(pr_number: str | int) -> str
same energy, we're just listing it, periodt
remote_url(use_token: bool = True) -> str
Gets you the remote url, token included for authentication if you asked for it ๐
upload_dists(tag: str, dist_glob: str) -> int
Uploads your distributions to a release ๐ฆ
:param tag:โ Tag to upload for:param path:โ Path to the dist directory
Returns: the number of distributions that made it up successfully ๐
upload_release_asset(release_id: int, file: str, label: str | None = None) -> bool
Uploads an asset to a release that already exists โ https://gitea.com/api/swagger#/repository/repoCreateReleaseAttachment
:param release_id:โ ID of the release to upload to:param file:โ Path of the file to upload:param label:โ this parameter has no effect (fr fr, it does nothing, don't fight it)
Returns: the status of the request
semantic_release.hvcs.github module ๐
Helper code for interacting with a GitHub remote VCS. iconic of them honestly.
class semantic_release.hvcs.github.Github(remote_url: str, *, hvcs_domain: str | None = None, hvcs_api_domain: str | None = None, token: str | None = None, allow_insecure: bool = False, **_kwargs: Any)
Bases: RemoteHvcsBase โ see #semantic_release.hvcs.remote_hvcs_base.RemoteHvcsBase
GitHub HVCS interface for interacting with GitHub repositories.
This class is out here supporting the following products:
- GitHub Free, Pro, & Team
- GitHub Enterprise Cloud
- GitHub Enterprise Server (on-premises installations)
It literally does its best to detect which product you've got configured based on the domain you hand it ๐ If it's the official github.com, the default domain, then it's considered GitHub Enterprise Cloud, which uses the subdomain api.github.com for api communication.
But if the domain is literally anything else, then it assumes you're talking to an on-premise or 3rd-party maintained GitHub instance, which matches the GitHub Enterprise Server product. The on-prem server product uses a path prefix for handling api requests, configured to be server.domain/api/v3 based on the documentation from April 2024. slay for accuracy.
DEFAULT_API_DOMAIN = 'api.github.com'DEFAULT_API_PATH_CLOUD = '/'DEFAULT_API_PATH_ONPREM = '/api/v3'DEFAULT_API_SUBDOMAIN_PREFIX = 'api'DEFAULT_API_URL_CLOUD = 'https://api.github.com'DEFAULT_DOMAIN = 'github.com'DEFAULT_ENV_TOKEN_NAME = 'GH_TOKEN'OFFICIAL_NAME = 'GitHub'
asset_upload_url(release_id: str) -> str | None
Gets you the correct upload url for a release โ https://docs.github.com/en/enterprise-server@3.5/rest/releases/releases#get-a-release
:param release_id:โ ID of the release to upload to:return:URL to upload for a release if it's found, elseNone
commit_hash_url(commit_hash: str) -> str
no description, it just exists and we love her for that
compare_url(from_rev: str, to_rev: str) -> str
Gets you the GitHub comparison link between two version tags.
:param from_rev:โ The older version to compare.:param to_rev:โ The newer version to compare.:return:Link to view a comparison between the two versions.
create_or_update_release(tag: str, release_notes: str, prerelease: bool = False) -> int
Posts the release changelog ๐
:param tag:โ The version number:param release_notes:โ The release notes for this version:param prerelease:โ Whether or not this release should be created as a prerelease:return:The status of the request
create_release(tag: str, release_notes: str, prerelease: bool = False, assets: list[str] | None = None, noop: bool = False) -> int
Creates a brand new release โจ
REF: https://docs.github.com/rest/reference/repos#create-a-release
Parameters
tag-- Tag to create release forrelease_notes-- The release notes for this versionprerelease-- Whether or not this release should be created as a prereleaseassets-- a list of artifacts to upload to the release
Returns: the ID of the release
create_release_url(tag: str = '') -> str
just chilling here with a default empty tag, no notes
edit_release_notes(release_id: int, release_notes: str) -> int
Edits a release with updated change notes โ https://docs.github.com/rest/reference/repos#update-a-release
:param release_id:โ ID of release to update:param release_notes:โ The release notes for this version:return:The ID of the release that was edited
static format_w_official_vcs_name(format_str: str) -> str
no description, mystery method, main character energy ๐
get_changelog_context_filters() -> tuple[Callable[..., Any], ...]
Gives you back a list of functions you can use as filters in a Jinja2 template
like, filters to convert text to URLs for issues and commits
get_release_id_by_tag(tag: str) -> int | None
Gets a release by its tag name โ https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name
:param tag:โ Tag to get release for:return:ID of release, if it's found, elseNone
issue_url(issue_num: str | int) -> str
literally just the signature, no description, love that for us
pull_request_url(pr_number: str | int) -> str
same, the docs said nothing and honestly same
remote_url(use_token: bool = True) -> str
Gets you the remote url, token included for authentication if you requested it ๐ซถ
upload_dists(tag: str, dist_glob: str) -> int
Uploads distributions to a release
:param tag:โ Version to upload for:param dist_glob:โ Path to the dist directory:return:The number of distributions successfully uploaded
upload_release_asset(release_id: int, file: str, label: str | None = None) -> bool
Uploads an asset to a release that already exists โ https://docs.github.com/rest/reference/repos#upload-a-release-asset
:param release_id:โ ID of the release to upload to:param file:โ Path of the file to upload:param label:โ Optional custom label for this file:return:The status of the request
semantic_release.hvcs.gitlab module ๐ฆ
Helper code for interacting with a Gitlab remote VCS
class semantic_release.hvcs.gitlab.Gitlab(remote_url: str, *, hvcs_domain: str | None = None, token: str | None = None, allow_insecure: bool = False, **_kwargs: Any)
Bases: RemoteHvcsBase โ see #semantic_release.hvcs.remote_hvcs_base.RemoteHvcsBase
Gitlab HVCS interface for interacting with Gitlab repositories.
DEFAULT_DOMAIN = 'gitlab.com'DEFAULT_ENV_TOKEN_NAME = 'GITLAB_TOKEN'OFFICIAL_NAME = 'GitLab'
commit_hash_url(commit_hash: str) -> str
no description bestie, we just vibe
compare_url(from_rev: str, to_rev: str) -> str
also no description ๐
create_or_update_release(tag: str, release_notes: str, prerelease: bool = False) -> str
Creates or updates a release for the given tag in a remote VCS.
Parameters
tag-- The tag to create or update the release forrelease_notes-- The changelog description for this version onlyprerelease-- This parameter has no effect in GitLab
Returns: The release id
Raises
ValueError-- If the release could not be created or updatedgitlab.exceptions.GitlabAuthenticationError-- If the user is not authenticatedGitlabUpdateError-- If the server cannot perform the request
create_release(tag: str, release_notes: str, prerelease: bool = False, assets: list[str] | None = None, noop: bool = False) -> str
Creates a release in a remote VCS, adding any release notes and assets to it ๐
Parameters
tag-- The tag to create the release forrelease_notes-- The changelog description for this version onlyprerelease-- This parameter has no effect in GitLabassets-- A list of paths to files to upload as assets (TODO: not implemented)noop-- IfTrue, do not perform any actions, only logger intents
Returns: The tag of the release
Raises GitlabAuthenticationError: If authentication is not correct
Raises GitlabCreateError: If the server cannot perform the request
create_release_url(tag: str = '') -> str
just sitting here with its lil default empty tag
edit_release_notes(release: ProjectRelease, release_notes: str) -> str
Updates the release notes for a given release.
Parameters
release-- The release object to updaterelease_notesโ the new release notes ๐
Returns โ the release id ๐ข
Raises GitlabAuthenticationError: if authentication is not correct ๐ต
Raises GitlabUpdateError: if the server cannot perform the request ๐
static format_w_official_vcs_name(format_str: str) -> str
get_changelog_context_filters() -> tuple[Callable[..., Any], ...]
Gimme a list of functions you can use as filters in a Jinja2 template. โจ
Like, filters that turn text into URLs for issues and commits, bestie โ that's the vibe.
get_release_by_tag(tag: str) -> ProjectRelease | None
Grab a release by its tag name, no cap. ๐ท๏ธ
Parameters
tagโ the tag name to get the release for
Returns โ gitlab.v4.objects.ProjectRelease or None if not found ๐
Raises gitlab.exceptions.GitlabAuthenticationError: if the user is not authenticated
issue_url(issue_num: str | int) -> str
merge_request_url(mr_number: str | int) -> str
property project: GitLabProject
pull_request_url(pr_number: str | int) -> str
remote_url(use_token: bool = True) -> str
Get the remote url โ including the token for authentication, if you asked for it. ๐
upload_dists(tag: str, dist_glob: str) -> int
Upload built distributions to a release on a remote VCS that supports such uploads. ๐ฆ
semantic_release.hvcs.remote_hvcs_base module
Common functionality and interface for interacting with Git remote VCS. ๐ซถ
class semantic_release.hvcs.remote_hvcs_base.RemoteHvcsBase(remote_url: str, *_args: Any, **_kwargs: Any)
Bases: HvcsBase
Interface for subclasses interacting with a remote VCS. ๐
This abstract class is defined to provide common helper functions and a set of basic methods that all remote VCS environments usually support.
So the tea is: if the remote vcs implementation (via subclass) does not support a functionality, it can just call super()'s method โ which defaults to a non-supported log message and empty results. That's lowkey more straightforward than checking for NotImplemented around every single function call in the core library code. ๐
DEFAULT_ENV_TOKEN_NAME = 'HVCS_TOKEN'
property api_url: Url
create_api_url(endpoint: str, auth: str | None = None, query: str | None = None, fragment: str | None = None) -> str
abstractmethod create_or_update_release(tag: str, release_notes: str, prerelease: bool = False) -> int | str
Create or update a release for the given tag in a remote VCS, attaching the given changelog โ if supported. ๐
abstractmethod create_release(tag: str, release_notes: str, prerelease: bool = False, assets: list[str] | None = None, noop: bool = False) -> int | str
Create a release in a remote VCS, if supported. ๐
Which includes uploading any assets as part of the release, iykyk.
create_repo_url(repo_path: str, query: str | None = None, fragment: str | None = None) -> str
create_server_url(path: str, auth: str | None = None, query: str | None = None, fragment: str | None = None) -> str
property hvcs_domain: Url
abstractmethod upload_dists(tag: str, dist_glob: str) -> int
Upload built distributions to a release on a remote VCS that supports such uploads. ๐ค
semantic_release.hvcs.token_auth module
class semantic_release.hvcs.token_auth.TokenAuth(token: str)
Bases: AuthBase
requests Authentication for token based authorization. This lets us attach the Authorization header with a token to a session. ๐
semantic_release.hvcs.util module
semantic_release.hvcs.util.build_requests_session(raise_for_status: bool = True, retry: bool | int | Retry = True, auth: TokenAuth | None = None) -> Session
Create a requests session. ๐ง
Parameters
raise_for_statusโ ifTrue, a hook to invokeraise_for_statusbe installedretryโ if true, it will use defaultRetryconfiguration. if an integer, it will use defaultRetryconfiguration with given integer as total retry count. ifRetryinstance, it will use this instance.authโ optionalTokenAuthinstance to be used to provide theAuthorizationheader to the session
Returns โ configured requests Session โญ
semantic_release.hvcs.util.suppress_http_error_for_codes(*codes: int) -> Callable[[Callable[[...], _R]], Callable[[...], _R | None]]
For the codes given, return a decorator that will suppress HTTPErrors that are raised from responses that came with one of those status codes. The function will return False instead of raising the HTTPError. ๐
semantic_release.hvcs.util.suppress_not_found(func: Callable[[...], _R]) -> Callable[[...], _R | None]
semantic_release.version package
Subpackages
semantic_release.version.declarations package
Submodules
semantic_release.version.declarations.enum module
class semantic_release.version.declarations.enum.VersionStampType(*values)
Bases: str, Enum
Enum for the type of version declaration. ๐ท๏ธ
NUMBER_FORMAT = 'nf'
TAG_FORMAT = 'tf'
semantic_release.version.declarations.file module
class semantic_release.version.declarations.file.FileVersionDeclaration(path: Path | str, stamp_format: VersionStampType)
Bases: IVersionReplacer
IVersionReplacer implementation that replaces the entire file content with the version string. ๐
This is useful for files that contain only a version number, such as VERSION files or similar single-line version storage files.
property content: str
A cached property that stores the content of the configured source file.
classmethod from_string_definition(replacement_def: str) -> FileVersionDeclaration
Create an instance of self from a string representing one item of the "version_variables" list in the configuration.
This method expects a definition in the format: file:*:format_type
where:
fileis the path to the file*is the literal asterisk character indicating file replacementformat_typeis either"nf"(number format) or"tf"(tag format)
parse() -> set[Version]
Deprecated since version 10.6.0: Function is unused and will be removed in a future release. ๐
replace(new_version: Version) -> str
Replace the file content with the new version string.
Parameters
new_versionโ the new version number as aVersioninstance
Returns โ the new content (just the version string) โจ
update_file_w_version(new_version: Version, noop: bool = False) -> Path | None
This method reads the underlying file, replaces each occurrence of the matched pattern, then writes the updated file. ๐
Parameters
new_versionโ the new version number as aVersioninstance
semantic_release.version.declarations.i_version_replacer module
class semantic_release.version.declarations.i_version_replacer.IVersionReplacer
Bases: object
Interface for subclasses that replace a version string in a source file. ๐
Methods generally have a base implementation are implemented here but likely just provide a not-supported message but return gracefully.
This class cannot be instantiated directly but must be inherited from and implement the designated abstract methods. ๐
abstractmethod parse() -> set[Version]
Return a set of the versions which can be parsed from the file. Because a source can match in multiple places, this method returns a set of matches. Generally, there should only be one element in this set (i.e. even if the version is specified in multiple places, it should be the same version in each place), but enforcing that condition is not mandatory or expected.
Deprecated since version 9.20.0: Function is unused and will be removed in a future release. ๐
abstractmethod replace(new_version: Version) -> str
Replace the version in the source content with new_version, and return the updated content. ๐
Parameters
new_versionโ the new version number as aVersioninstance
abstractmethod update_file_w_version(new_version: Version, noop: bool = False) -> Path | None
This method reads the underlying file, replaces each occurrence of the matched pattern, then writes the updated file. ๐
Parameters
new_versionโ the new version number as aVersioninstance
semantic_release.version.declarations.pattern module
class semantic_release.version.declarations.pattern.PatternVersionDeclaration(path: Path | str, search_text: str, stamp_format: VersionStampType)
Bases: IVersionReplacer
...and she's a VersionDeclarationABC implementation that reps a version number living in one specific file ๐. The version number gets spotted by a regular expression, and you gotta hand that regex over in search_text. iykyk ๐
content: strโ a cached property, bestie. It holds onto the content of the source file you configured, so we're not re-reading it every five seconds. Caching is self-care ๐classmethod from_string_definition(replacement_def: str, tag_format: str) -> PatternVersionDeclarationโ makes you an instance ofselfout of one little string that reps a single item from the"version_variables"list in your config ๐parse() -> set[Version]โ hands back the versions that match this pattern. And the way a pattern can match in multiple places? That's exactly why this returns a set of matches, periodt. Usually there's only one element chilling in there (like, even if the version shows up in several spots, it should be the same version each time), but checking that condition? That's on the caller, not on us ๐
โ ๏ธ Deprecated since version 9.20.0: this function is unused and will be removed in a future release. Rip bozo ๐
replace(new_version: Version) -> strโ swaps the version in the source content out fornew_versionand gives you back the updated content โจ
Parameters
new_versionโ the new version number, as aVersioninstance ๐
update_file_w_version(new_version: Version, noop: bool = False) -> Path | Noneโ this one reads the underlying file, replaces every occurrence of the matched pattern, then writes the updated file back. Full glow-up ๐ฆ
Parameters
new_versionโ the new version number, as aVersioninstance ๐
๐ธ semantic_release.version.declarations.pattern.VersionSwapper
class semantic_release.version.declarations.pattern.VersionSwapper(new_version_str: str, group_match_name: str)
Bases: object
It's a callable whose whole job is replacing a version number inside a string with a new version number. Small role, big impact ๐
๐ semantic_release.version.declarations.toml module
class semantic_release.version.declarations.toml.TomlVersionDeclaration(
path: Path | str,
search_text: str,
stamp_format: VersionStampType,
)
Bases: IVersionReplacer
content: strโ a cached property storing the content of the source file you configured. Cozy ๐classmethod from_string_definition(replacement_def: str) -> TomlVersionDeclarationโ builds an instance ofselffrom a string that reps one item of the"version_toml"list in the config ๐parse() -> set[Version]โ goes looking for the version inside the source content ๐
โ ๏ธ Deprecated since version 9.20.0: function is unused and will be removed in a future release. We're grieving ๐
replace(new_version: Version) -> strโ replaces the version in the source content withnew_version, returns the updated content, slay โจupdate_file_w_version(new_version: Version, noop: bool = False) -> Path | Noneโ reads the underlying file, replaces each occurrence of the matched pattern, writes the updated file. That's the whole arc ๐
Parameters
new_versionโ the new version number, as aVersioninstance ๐
๐ง Submodules
semantic_release.version.algorithm module
semantic_release.version.algorithm.next_version(
repo: Repo,
translator: VersionTranslator,
commit_parser: CommitParser[ParseResult, ParserOptions],
allow_zero_version: bool,
major_on_zero: bool,
prerelease: bool = False,
) -> Version
Evaluates the history inside repo, and based on the tags and commits hanging out in that repo history, it figures out the next semantic version that should be applied to a release. Main character detective energy ๐๐
semantic_release.version.algorithm.tags_and_versions(
tags: Iterable[Tag],
translator: VersionTranslator,
) -> list[tuple[Tag, Version]]
Returns a list of 2-tuples, where every element is a tuple (tag, version) built from the tags in the Git repo and their corresponding Version per Version.from_tag. The list comes back sorted according to semver ordering rules. ๐
Any tags that translator doesn't match up with? They get ignored, no hard feelings ๐
semantic_release.version.declaration module
class semantic_release.version.declaration.VersionDeclarationABC(*args, **kwargs)
Bases: ABC
It's the ABC for classes that rep a location where a version gets declared somewhere inside the source tree of the repo ๐ณ
โ ๏ธ Deprecated since version 9.20.0: this got refactored into a composition paradigm using the new IVersionReplacer interface. This class will be removed in a future release. It's giving legacy ๐
content: strโ the content of the source file where the version is stored. This property is cached in the instance variable_content๐พabstractmethod parse() -> set[Version]โ returns a set of the versions that can be parsed out of the file. Since a source can match in multiple places, this method returns a set of matches. Generally there should only be one element in that set (like, even if the version is specified in multiple places, it should be the same version in each place) โ but enforcing that condition is not mandatory or expected, so don't come for us ๐abstractmethod replace(new_version: Version) -> strโ updates the versions. This method reads the underlying file, replaces each occurrence of the matched pattern, then writes the updated file.:param new_version:the new version number as aVersioninstance ๐write(content: str) -> Noneโ writes new content back to the source path. Use it alongside.replace(): ๐
>>> class MyVD(VersionDeclarationABC): ...
def parse(self): ... ... def replace(self, new_version: Version): ... ... def write(self, content: str): ...
>>> new_version = Version.parse("1.2.3")
>>> vd = MyVD("path", r"__version__ = (?P<version>\d+\d+\d+)")
>>> vd.write(vd.replace(new_version))
semantic_release.version.translator module
class semantic_release.version.translator.VersionTranslator(
tag_format: str = 'v{version}',
prerelease_token: str = 'rc',
add_partial_tags: bool = False,
)
Bases: object
This class handles translating from Git tags into their corresponding Version instances. Glow-up translator ๐โจ
from_string(version_str: str) -> Versionโ returns aVersioninstance from a string. It delegates directly toVersion.parse, using the translator's own stored values fortag_formatandprerelease๐ซถfrom_tag(tag: str) -> Version | Noneโ returns aVersioninstance from a Git tag, iftag_formatmatches the format that would have generated the tag from a version. Otherwise it returnsNone, no explanation, no closure ๐ญ. For example, a tag of'v1.2.3'should be matched iftag_format = 'v{version}, but not iftag_format = staging--v{version}๐ท๏ธstr_to_tag(version_str: str) -> strโ formats a version string into a tag name ๐
semantic_release.version.version module
class semantic_release.version.version.Version(
major: int,
minor: int,
patch: int,
*,
prerelease_token: str = 'rc',
prerelease_revision: int | None = None,
build_metadata: str = '',
tag_format: str = 'v{version}',
)
Bases: object
as_major_tag() -> stras_minor_tag() -> stras_patch_tag() -> stras_semver_tag() -> stras_tag() -> strbump(level: LevelBump) -> Versionโ returns a brand newVersioninstance according to thelevelyou specified to bump ๐. Heads up: this will intentionally drop the build metadata โ that should be added elsewhere for the specific build producing this version. So don't @ me about the missing metadata ๐finalize_version() -> Versionis_prerelease: boolโ a property, bestie ๐classmethod parse(version_str: str, tag_format: str = 'v{version}', prerelease_token: str = 'rc') -> Versionโ parses a version string into aVersioninstance. Inspired bysemver.version:VersionInfo.parse, except this implementation doesn't allow optional minor and patch versions โ they're required, no skipping โ
Parameters
prerelease_tokenโ will be ignored if the version string is a prerelease; the parsed token fromversion_strwins instead. Sorry not sorry ๐
tag_format: strโ a property โจto_prerelease(token: str | None = None, revision: int | None = None) -> Version
๐ฆ Submodules
semantic_release.const module
(no extra deets here, she's just vibing ๐ธ)
semantic_release.enums module
class semantic_release.enums.LevelBump(*values)
Bases: IntEnum
An IntEnum representing the valid types of bumps for a version. We use an IntEnum specifically so we can order the levels like the queens they are ๐๐
MAJOR = 4MINOR = 3NO_RELEASE = 0PATCH = 2PRERELEASE_REVISION = 1classmethod from_string(val: str) -> LevelBumpโ bestie, this is how you turn a string into an actualLevelBumpโจ. It grabs the level straight from its string representation. And for backwards-compatibility (yes, the elders were thinking of us), dashes get swapped for underscores, so:
LevelBump.from_string("no-release") == LevelBump.NO_RELEASE
Equally, like, same energy:
LevelBump.from_string("minor") == LevelBump.MINOR
semantic_release.enums module (continued) ๐
class semantic_release.enums.SemanticReleaseLogLevels(*values)โ Bases:IntEnum. It's anIntEnumrepresenting the log levels used bysemantic-release. Every value, no skips, here we go ๐:CRITICAL = 50DEBUG = 10ERROR = 40FATAL = 50INFO = 20SILLY = 5WARNING = 30
ngl the fact thatCRITICALandFATALare both50is giving "we share a locker" energy but okay ๐ they said what they said.
semantic_release.errors module โ Custom Errors ๐ญ
Okay so this is the feelings section. Every single custom exception, its base class, and exactly what it means. Deep breaths ๐ซถ:
exception semantic_release.errors.AssetUploadErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure uploading an asset to a remote hvcs's release artifact storage.exception semantic_release.errors.BuildDistributionsErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure to build the distribution files.exception semantic_release.errors.CommitParseErrorโ Bases:SemanticReleaseBaseError. Raised when a commit cannot be parsed by a commit parser. Bestie, listen: custom commit parsers should also raise this Exception. That's the rule ๐exception semantic_release.errors.DetachedHeadGitErrorโ Bases:SemanticReleaseBaseError. Raised when the git repository is in a detached HEAD state.exception semantic_release.errors.GitAddErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure to add files to the git index.exception semantic_release.errors.GitCommitEmptyIndexErrorโ Bases:SemanticReleaseBaseError. Raised when there is an attempt to commit an empty index.exception semantic_release.errors.GitCommitErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure to commit the changes.exception semantic_release.errors.GitFetchErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure to fetch from the git remote.exception semantic_release.errors.GitPushErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure to push to the git remote.exception semantic_release.errors.GitTagErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure to tag the release.exception semantic_release.errors.IncompleteReleaseErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure amongst one of the api requests when creating a release on a remote hvcs.exception semantic_release.errors.InternalErrorโ Bases:SemanticReleaseBaseError. Raised when an internal error occurs, which should never happen. (Not me manifesting an exception that literally says it should never exist ๐ซ )exception semantic_release.errors.InvalidConfigurationโ Bases:SemanticReleaseBaseError. Raised when configuration is deemed invalid.exception semantic_release.errors.InvalidParserOptionsโ Bases:InvalidConfiguration. Raised when the parser options are invalid.exception semantic_release.errors.InvalidVersionโ Bases:ValueError,SemanticReleaseBaseError. Raised whenVersion.parseattempts to parse a string containing an invalid version.exception semantic_release.errors.LocalGitErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure with local git operations.exception semantic_release.errors.MissingGitRemoteโ Bases:SemanticReleaseBaseError. Raised when repository is missing the configured remoteoriginorupstream.exception semantic_release.errors.MissingMergeBaseErrorโ Bases:SemanticReleaseBaseError. Raised when the merge base cannot be found with the current history. Generally because of a shallow git clone.exception semantic_release.errors.NotAReleaseBranchโ Bases:InvalidConfiguration. Raised whensemantic_releaseis invoked on a branch which isn't configured for releases.exception semantic_release.errors.ParserLoadErrorโ Bases:SemanticReleaseBaseError. Raised when there is a failure to find, load, or instantiate a custom parser definition.exception semantic_release.errors.SemanticReleaseBaseErrorโ Bases:Exception. The Base Exception from which all other custom Exceptions defined insemantic_releaseinherit. The mother of the family tree ๐ธexception semantic_release.errors.UnexpectedResponseโ Bases:SemanticReleaseBaseError. Raised when an HTTP response cannot be parsed properly or the expected structure is not found.exception semantic_release.errors.UnknownUpstreamBranchErrorโ Bases:SemanticReleaseBaseError. Raised when the upstream branch cannot be determined.exception semantic_release.errors.UpstreamBranchChangedErrorโ Bases:SemanticReleaseBaseError. Raised when the upstream branch has changed before pushing.
semantic_release.gitproject module โ git operations, but make it cute ๐ฆ
Module for git related operations. Say it with me: module for git related operations โจ
class semantic_release.gitproject.GitProject(directory: Path | str = '.', commit_author: Actor | None = None, credential_masker: MaskingFilter | None = None)โ Bases:object. The main character fr fr ๐
Methods, all of them, in order:
git_add(paths: Sequence[Path | str], force: bool = False, strict: bool = False, noop: bool = False) -> Nonegit_commit(message: str, date: int | None = None, commit_all: bool = False, no_verify: bool = False, noop: bool = False) -> Nonegit_push_branch(remote_url: str, branch: str, noop: bool = False) -> Nonegit_push_tag(remote_url: str, tag: str, noop: bool = False, force: bool = False) -> Nonegit_tag(tag_name: str, message: str, isotimestamp: str, force: bool = False, noop: bool = False) -> Nonegit_unshallow(noop: bool = False) -> Noneโ Convert a shallow clone to a full clone by fetching the full history. ๐ซถ
Parameters:
noopโ Whether or not to actually run the unshallow command.
is_dirty() -> boolis_shallow_clone() -> boolโ Check if the repository is a shallow clone.
Returns: True if the repository is a shallow clone, False otherwise.
property logger: Loggerproperty project_root: Pathverify_upstream_unchanged(local_ref: str = 'HEAD', upstream_ref: str = 'origin', remote_url: str | None = None, noop: bool = False) -> Noneโ Verify that the upstream branch has not changed since the given local reference. Vibe check for your remote, basically ๐
Parameters:
local_refโ The local reference to compare against upstream (default:HEAD)upstream_refโ The name of the upstream remote or specific remote branch (default:origin)remote_urlโ Optional authenticated remote URL to use for fetching (default:None, uses configured remote)noopโ Whether to skip the actual verification (for dry-run mode)
Raises UpstreamBranchChangedError โ If the upstream branch has changed. Yeah. It will absolutely tell on you. ๐ญ
semantic_release.globals module โ the global girlies ๐
Semantic Release Global Variables. Two of them. Iconic.
semantic_release.globals.log_level: SemanticReleaseLogLevels = SemanticReleaseLogLevels.WARNINGโint: Logging level forsemantic-release.semantic_release.globals.logger: Logger = <Logger semantic_release (WARNING)>โ Logger forsemantic-release.
Default is WARNING twice over, so if you're wondering why you're not seeing the fun debug lore, that's why bestie ๐
semantic_release.helpers module โ tiny little guys that help ๐ง
class semantic_release.helpers.ParsedGitUrl(scheme: str, netloc: str, namespace: str, repo_name: str)โ Bases:NamedTuple. Container for the elements parsed from a git URL ๐ธnamespace: strโ Alias for field number 2netloc: strโ Alias for field number 1repo_name: strโ Alias for field number 3scheme: strโ Alias for field number 0
(yes the field numbers are out of order in the listing, and no we are not fixing it, that's literally what it says ๐)
semantic_release.helpers.check_tag_format(tag_format: str) -> Nonesemantic_release.helpers.dynamic_import(import_path: str) -> Anyโ Dynamically import an object from a conventionally formatted"module:attribute"string.semantic_release.helpers.format_arg(value: Any) -> strโ Helper to format an argument an argument for logging. (the docs really said "an argument an argument", and honestly? same ๐ซถ)semantic_release.helpers.get_number_from_str(string: str, default: int = -1, interpret_hex: bool = False) -> intsemantic_release.helpers.logged_function(logger: Logger) -> Callable[[_FuncType[_R]], _FuncType[_R]]โ Decorator which adds debug logging of a function's input arguments and return value. The input arguments are logged before the function is called, and the return value is logged once it has completed.
Parameters:
loggerโ Logger to send output to.
semantic_release.helpers.parse_git_url(url: str) -> ParsedGitUrlโ Attempt to parse a string as a git urlhttp[s]://,git://,file://, or ssh format, into aParsedGitUrl. ๐ฅ- supported examples:
<http://git.mycompany.com/username/myproject.git>
<https://github.com/username/myproject.git> <https://gitlab.com/group/subgroup/myproject.git> <https://git.mycompany.com:4443/username/myproject.git>
git://host.xz/path/to/repo.git/
git://host.xz:9418/path/to/repo.git/
git@github.com:username/myproject.git <-- assumes ssh://
ssh://git@github.com:3759/myproject.git <-- non-standard, but assume user 3759
ssh://git@github.com:username/myproject.git
ssh://git@bitbucket.org:7999/username/myproject.git
git+ssh://git@github.com:username/myproject.git
/Users/username/dev/remote/myproject.git <-- Posix File paths
file:///Users/username/dev/remote/myproject.git
C:/Users/username/dev/remote/myproject.git <-- Windows File paths
file:///C:/Users/username/dev/remote/myproject.git
REFERENCE: <https://stackoverflow.com/questions/31801271/what-are-the-supported-git-url-formats>
It raises ValueError if the url can't be parsed, bestie โ no vibes for unparseable URLs, sorry. ๐ญ
๐ธ semantic_release.helpers.sort_numerically
semantic_release.helpers.sort_numerically(iterable: Iterable[str], reverse: bool = False, allow_hex: bool = False) -> list[str]
๐ธ semantic_release.helpers.text_reducer
semantic_release.helpers.text_reducer(text: str, filter_pair: tuple[Pattern[str], str]) -> str
Reduce function to apply mulitple filters to a string โจ (yes it's spelled that way in the original, we don't make the rules ๐ )
๐ธ semantic_release.helpers.validate_types_in_sequence
semantic_release.helpers.validate_types_in_sequence(sequence: Sequence[Any], types: type <#semantic_release.cli.config.RemoteConfig.type> | tuple[type <#semantic_release.cli.config.RemoteConfig.type>, ...]) -> bool
Validate that all elements in a sequence are of a specific type ๐ no liars allowed in the sequence โ
๐ซถ Contributing
Love Python Semantic Release? Want to help out? There are so many ways you can contribute to the project! ๐
You can help by:
- Reporting bugs and issues ๐
- Suggesting new features ๐ก
- Improving the documentation ๐
- Reviewing pull requests ๐
- Contributing code ๐ป
- Helping with translations ๐
- Spreading the word about Python Semantic Release ๐ฃ
- Participating in discussions ๐ฌ
- Testing new features and providing feedback ๐งช
No matter how you choose to contribute, please check out our Contributing Guidelines <#contributing-guide> and know we appreciate your help! ๐
Check out all the folks whom already contributed to Python Semantic Release and become one of them today! โญ
Contributors <https://github.com/python-semantic-release/python-semantic-release/graphs/contributors>
๐ Contributing
If you want to contribute that is awesome. Remember to be nice to others in issues and reviews. ๐ซถ
Please remember to write tests for the cool things you create or fix. ๐งช
Unsure about something? No worries, open an issue <https://github.com/python-semantic-release/python-semantic-release/issues/new>. ๐
๐ฌ Commit messages
Since python-semantic-release is released with python-semantic-release we need the commit messages to adhere to the Conventional Commits Specification <https://www.conventionalcommits.org/en/v1.0.0>. Although scopes are optional, scopes are expected where applicable. Changes should be committed separately with the commit type they represent, do not combine them all into one commit. ๐ซ๐ฆ
If you are unsure how to describe the change correctly just try and ask about it in your pr. If we think it should be something else or there is a pull-request without tags we will help out in adding or changing them. ๐
๐ Releases
This package is released by python-semantic-release on each master build, thus if there are changes that should result in a new release it will happen if the build is green. ๐ขโจ
๐ ๏ธ Development
Install this module and the development dependencies
pip install -e .[dev,mypy,test]
And if you'd like to build the documentation locally ๐ซง
pip install -e .[docs]
sphinx-autobuild --open-browser docs docs/_build/html
๐งช Testing
To test your modifications locally:
# Run type-checking, all tests across all supported Python versions
tox
# Run all tests for your current installed Python version (with full error output)
pytest -vv --comprehensive
# Run unit tests for your current installed Python version
pytest
# or
pytest -vv -m unit
# Run end-to-end tests for your current installed Python version (with full error output)
pytest -vv -m e2e [--comprehensive]
The --comprehensive flag is optional and will run all the variations of tests and it does take significantly longer to run. โณ no cap
๐๏ธ Building
This project is designed to be versioned and built by itself using the tool.semantic_release configuration in pyproject.toml. The setting tool.semantic_release.build_command defines the command to run to build the package. ๐ฆ
The following is a copy of the build_command setting which can be run manually to build the package locally:
pip install -e .[build]
python -m build .
๐ GETTING STARTED
If you haven't done so already, install Python Semantic Release locally following the installation instructions. ๐
If you are using a CI/CD service, you may not have to add Python Semantic Release to your project's dependencies permanently, but for the duration of this guide for the initial setup, you will need to have it installed locally. ๐ป
๐ Configuring PSR
Python Semantic Release ships with a reasonable default configuration but some aspects MUST be customized to your project. To view the default configuration, run the following command:
semantic-release generate-config
The output of the above command is the default configuration in TOML format without any modifications. If this is fine for your project, then you do not need to configure anything else. โจ
PSR accepts overrides to the default configuration keys individually. If you don't define the key-value pair in your configuration file, the default value will be used. ๐
By default, Python Semantic Release will look for configuration overrides in pyproject.toml under the TOML table [tool.semantic_release]. You may specify a different file using the -c/--config option, for example:
# In TOML format with top level table [semantic_release]
semantic-release -c releaserc.toml
# In JSON format with top level object key {"semantic_release": {}}
semantic-release -c releaserc.json
The easiest way to get started is to output the default configuration to a file, delete keys you do not need to override, and then edit the remaining keys to suit your project. ๐
To set up in pyproject.toml, run the following command:
# In file redirect in bash
semantic-release generate-config --pyproject >> pyproject.toml
# Open your editor to edit the configuration
vim pyproject.toml
See also:
cmd-generate-config- Configuration <#configuration>
๐ฆ Configuring the Version Stamp Feature
One of the best features of Python Semantic Release is the ability to automatically stamp the new version number into your project files, so you don't have to manually update the version upon each release. The version that is stamped is automatically determined by Python Semantic Release from your commit messages which compliments automated versioning seamlessly. ๐
The most crucial version stamp is the one in your project metadata, which is used by the Python Package Index (PyPI) and other package managers to identify the version of your package. ๐ฆ
For Python projects, this is typically the version field in your pyproject.toml file. First, set up your project metadata with the base version value. If you are starting with a brand new project, set project.version = "0.0.0". If you are working on an existing project, set it to the last version number you released. Do not include any v prefix. ๐ซ
Important: The version number must be a valid SemVer version, which means it should follow the formatMAJOR.MINOR.PATCH(e.g.,1.0.0). Python Semantic Release does NOT support Canonical version values defined in the PEP 440 <https://peps.python.org/pep-0440/> specification at this time. See Issue #455 <https://github.com/python-semantic-release/python-semantic-release/issues/455> for more details. Note that you can still define a SemVer version in theproject.versionfield, and when your build is generated, the build tool will automatically generate a PEP 440 compliant version as long as you do NOT use a non-pep440 compliant pre-release token. ๐ญ
Your project metadata might look like this in pyproject.toml:
[project]
name = "my-package"
version = "0.0.0" # Set this to the last released version or "0.0.0" for new projects
description = "A sample Python package"
To configure PSR to automatically update this version number, you need to specify the file and value to update in your configuration. Since pyproject.toml uses TOML format, you will add the replacement specification to the tool.semantic_release.version_toml list. Update the following configuration in your pyproject.toml file to include the version variable location:
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
# Alternatively, if you are using poetry's 'version' key, then you would use:
version_toml = ["pyproject.toml:tool.poetry.version"]
If you have other TOML files where you want to stamp the version, you can add them to the version_toml list as well. In the above example, there is an implicit assumption that you only want the version as the raw number format. If you want to specify the full tag value (e.g. v-prefixed version), then include :tf for "tag format" at the end of the version variable specification. ๐ท๏ธ
For non-TOML formatted files (such as JSON or YAML files), you can use the version_variables <#config-version-variables> configuration key instead. This feature uses an advanced Regular Expression to find and replace the version variable in the specified files. ๐โจ
For Python files, its much more effective to use importlib instead which will allow you to dynamically import the version from your package metadata and not require your project to commit the version number bump to the repository. For example, in your package's base __init__.py
# my_package/__init__.py
from importlib.metadata import version as get_version
__version__ = get_version(__package__)
# Note: __package__ must match your 'project.name' as defined in pyproject.toml
See also:
- Configuration specification of
version_toml<#config-version-toml> - Configuration specification of
version_variables<#config-version-variables>
๐ ๏ธ Using PSR to Build your Project ๐ ๏ธ
okay so now that you've stamped the version into your project files, PSR is literally right there to help you build your project artifacts as part of the versioning process. iconic behavior tbh. To turn it on, you need to specify the build command in your configuration โ no cap.
When does it fire? After the next version has been determined and stamped into your files, but before a release tag has been created. the timing?! immaculate. โฐโจ
To set up the build command, add this to your pyproject.toml file:
[tool.semantic_release]
build_command = "python -m build --sdist --wheel ."
See also:
build_command<#config-build-command> โ the config spec for your build command, bestie.build_command_env<#config-build-command-env> โ the config spec for the build command's environment variables. ๐ซถ
๐ Choosing a Commit Message Parser ๐
PSR reads your commit messages to figure out what kind of version bump your project needs. and it's not picky โ PSR supports multiple commit message parsing styles, so you can pick the one that fits your project's whole vibe.
Choose one of the supported commit parsers from Commit Parsing <#commit-parsing>, or bring your own and configure it in your pyproject.toml file. main character move. ๐
Every commit parser comes with its own default configuration options, so if you wanna customize how the parser behaves, you have to spell out exactly which parser options you want to override:
[tool.semantic_release]
commit_parser = "conventional"
[tool.semantic_release.commit_parser_options]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
parse_squash_commits = true
ignore_merge_commits = true
๐ Choosing your Changelog ๐
Before a release gets created, PSR generates a changelog from your project's commit messages. And this changelog is extremely customizable โ from the format all the way down to the content of each section. PSR ships with a default changelog template that gets used if you don't provide custom templates. For most projects the default is honestly enough, and it has its own set of configuration options to play with. ๐ธ
For basic customization, you can pick either a traditional Markdown formatted changelog (that's the default) or, if you want to integrate with a Sphinx Documentation project, the reStructuredText (RST) format. You can also choose the file name and the location of where the default changelog gets written.
To set your changelog location and changelog format, add this to your pyproject.toml file:
[tool.semantic_release.changelog.default_templates]
changelog_file = "docs/source/CHANGELOG.rst"
output_format = "rst" # or "md" for Markdown format
Second โ and honestly more important โ aspect of configuring your changelog: define your Commit Exclusion Patterns. Those are the patterns used to filter commits out of the changelog. Heads up bestie: PSR does NOT (yet) come with a built-in set of exclusion patterns, so you're defining them yourself, fr fr. These commit patterns should be in line with your project's commit parser configuration.
To set commit exclusion patterns for a conventional commits parser, add this to your pyproject.toml file:
[tool.semantic_release.changelog]
# Recommended patterns for conventional commits parser that is scope aware
exclude_commit_patterns = [
'''chore(?:\([^)]*?\))?: .+''',
'''ci(?:\([^)]*?\))?: .+''',
'''refactor(?:\([^)]*?\))?: .+''',
'''style(?:\([^)]*?\))?: .+''',
'''test(?:\([^)]*?\))?: .+''',
'''build\((?!deps\): .+)''',
'''Initial [Cc]ommit.*''',
]
See also:
- Changelog <#config-changelog> โ go customize your changelog ๐
changelog.mode<#config-changelog-mode> โ pick the changelog mode ('update'or'init')- Migrating an Existing Changelog <#changelog-templates-migrating-existing-changelog>
๐ Defining your Release Branches ๐
PSR has a powerful feature for managing release types across multiple branches, so you can set your project up with different release branches for different purposes โ pre-release branches, beta branches, your stable releases, the whole crew. ๐ฆ
Note: Most projects that do NOT publish pre-releases will be totally fine with PSR's built-in default. don't overthink it.
To define an alpha pre-release branch for when you're working on a fix or a new feature, add this to your pyproject.toml file:
[tool.semantic_release.branches.alpha]
# Matches branches with the prefixes 'feat/', 'fix/', or 'perf/'.
match = "^(feat|fix|perf)/.+"
prerelease = true
prerelease_token = "alpha"
Any time you execute semantic-release version on a branch with the prefix feat/, fix/, or perf/, PSR will determine if a version bump is needed, and if it is, the resulting version will be a pre-release version with the alpha token. For example:
- Branch
mainโ Version Bump: Patch โ Current Version:1.0.0โ Next Version:1.0.1 - Branch
fix/bug-1โ Version Bump: Patch โ Current Version:1.0.0โ Next Version:1.0.1-alpha.1
See also:
- Multibranch Releases <#multibranch-releases> โ learn all about multi-branch releases and how to configure them. ๐
๐ Configuring VCS Releases ๐
You can set Python Semantic Release up to create Releases in your remote version control system, so you can publish assets and release notes for your project. it's giving professional. โจ
To do that, you need to place an authentication token in the appropriate environment variable, so Python Semantic Release can authenticate with the remote VCS to push tags, create releases, or upload files. ๐
๐ GitHub (GH_TOKEN) ๐
For local publishing to GitHub, you should use a personal access token and store it in your environment variables. Specify the name of the environment variable in your configuration setting remote.token <#config-remote-token>. The default is GH_TOKEN.
To generate a token go to <https://github.com/settings/tokens> and click on "Generate new token".
For Personal Access Token (classic), you will need the repo scope to write (ie. push) to the repository.
For fine-grained Personal Access Tokens, you will need the contents <https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens#repository-permissions-for-contents> permission.
๐ฆ GitLab (GITLAB_TOKEN) ๐ฆ
A personal access token from GitLab. This is used for authenticating when pushing tags, publishing releases etc. This token should be stored in the GITLAB_TOKEN environment variable.
๐ต Gitea (GITEA_TOKEN) ๐ต
A personal access token from Gitea. This token should be stored in the GITEA_TOKEN environment variable.
๐ชฃ Bitbucket (BITBUCKET_TOKEN) ๐ชฃ
Bitbucket does not support uploading releases but can still benefit from automated tags and changelogs. The user has three options to push changes to the repository:
- Use SSH keys.
- Use an App Secret <https://support.atlassian.com/bitbucket-cloud/docs/push-back-to-your-repository/#App-secret>, store the secret in the
BITBUCKET_TOKENenvironment variable and the username inBITBUCKET_USER. - Use an Access Token <https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens> for the repository and store it in the
BITBUCKET_TOKENenvironment variable.
See also:
- Changelog <#config-changelog> โ customize your project's changelog.
- Custom Release Notes <#changelog-templates-custom-release-notes> โ customize the published release notes
version --vcs-release/--no-vcs-releaseโ enable/disable VCS release creation.
๐งช Testing your Configuration ๐งช
It's time to test your configuration! let's gooo ๐ญ๐
# 1. Run the command in no-operation mode to see what would happen
semantic-release -v --noop version
# 2. If the output looks reasonable, try to run the command without any history changes
# '-vv' will give you verbose debug output, which is useful for troubleshooting
# commit parsing issues.
semantic-release -vv version --no-commit --no-tag
# 3. Evaluate your repository to see the changes that were made but not committed
# - Check the version number in your pyproject.toml
# - Check the distribution files from the build command
# - Check the changelog file for the new release notes
# 4. If everything looks good, make sure to commit/save your configuration changes
git add pyproject.toml
git commit -m "chore(config): configure Python Semantic Release"
# 5. Now, try to run the release command with your history changes but without pushing
semantic-release -v version --no-push --no-vcs-release
# 6. Check the result on your local repository
git status
git log --graph --decorate --all
# 7a. If you are happy with the release history and resulting commit & tag,
# reverse your changes before trying the full release command.
git tag -d v0.0.1 # replace with the actual version you released
git reset --hard HEAD~1
# 7b. [Optional] Once you have configured a remote VCS token, try
# running the full release command to update the remote repository.
semantic-release version --push --vcs-release
# This is optional as you may not want a personal access token set up or make
# make the release permanent yet.
See also:
- cmd-version
- Increasing Verbosity <#troubleshooting-verbosity>
โก Configuring CI/CD โก
PSR is meant to help you release at speed! See our CI/CD Configuration guides under the Automated Releases <#automatic> section. go off. ๐โโ๏ธ๐จ
โ๏ธ Author โ๏ธ
Python Semantic Release Team
๐ Copyright ๐
2026, Python Semantic Release Team
and that's a wrap on the whole page, bestie ๐ this was version 10.6.1, dated Jul 07, 2026 โ go forth and release with main character energy, you've got this ๐ซถโจ
๐ฆ where this page comes from
- ubuntu stonking: python3-semantic-release 10.6.1-1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms