1.0.0-dev.2 • Published 6 months ago
@artessan-devs/sr-uv-plugin v1.0.0-dev.2
semantic-release-pyproject
A semantic-release plugin to automatically update the version in your Python pyproject.toml file during release.
Installation
Install the plugin from npm:
npm install --save-dev @artesssan-devs/sr-uv-pluginUsage
- Add the plugin to your semantic-release configuration
Update your .releaserc.json to include the plugin:
{
"branches": [
"main",
{ "name": "dev", "prerelease": true }
],
"plugins": [
"@artesssan-devs/sr-uv-plugin",
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["pyproject.toml", "CHANGELOG.md"]
}
]
]
}- Commit the updated
pyproject.tomlfile
When the plugin updates the pyproject.toml file during the release process, it will automatically commit the changes to your repository. The @semantic-release/git plugin ensures that the updated pyproject.toml and other specified assets (e.g., CHANGELOG.md) are committed.
What it does
- verifyConditions: Ensures
pyproject.tomlexists and contains a[project]section. - prepare: Updates the
[project].versionfield inpyproject.tomlto match the release version.
Development & Testing
- Tests are located in
test/semantic-release-pyproject.test.tsand use vitest. - Run tests with:
npm testLicense
MIT
1.0.0-dev.2
6 months ago