1.0.0-dev.2 • Published 6 months ago

@artessan-devs/sr-uv-plugin v1.0.0-dev.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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-plugin

Usage

  1. 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"]
      }
    ]
  ]
}
  1. Commit the updated pyproject.toml file

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.toml exists and contains a [project] section.
  • prepare: Updates the [project].version field in pyproject.toml to match the release version.

Development & Testing

  • Tests are located in test/semantic-release-pyproject.test.ts and use vitest.
  • Run tests with:
npm test

License

MIT

1.0.0-dev.2

6 months ago