ci: add release to PyPI with semantic versioning#36
Conversation
…the examples folder
There was a problem hiding this comment.
Pull request overview
This PR implements automated PyPI releases with semantic versioning for the nisystemlink-demo package. The implementation uses python-semantic-release to automatically bump versions based on Conventional Commits, then publishes to PyPI whenever code affecting the package is merged to the main/master branch.
Key Changes:
- Added automated release workflow that runs after successful builds on pushes to main/master
- Documented Conventional Commits specification for contributors to ensure proper semantic versioning
- Added path filters to limit workflow execution to relevant file changes
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/python-package.yml |
Added release job with semantic versioning and PyPI publishing; added path filters to trigger workflows only for relevant files |
CONTRIBUTING.md |
Added comprehensive documentation on Conventional Commits format, version bump types, and commit message examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
make python versions consistent Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Make step versions consistent Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
use the right action bot email Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@adamarnesen - Could you explain the rationale for publishing the example code to PyPI? I.e., Do you have a customer/solutions/sales workflow that would have them install the code as a library instead of cloning the repo or just copying and pasting the relevant code? Can we provide a one-liner to copy the repo to a directory instead? |
@fredvisser There are two reasons.
This isn't releasing all the examples, just the newly created library that I intend to have used for these types of common/reusable bits. |
Justification
There are two main reasons that we're adding a PyPi package deployment to this repository:
After this goes in, anytime we submit code to the core libraries, and the PR is approved, it will publish a new package version to PyPi. This will use semantic versioning just as our other SystemLink APIs do.
Implementation
Testing
This one is a bit difficult to test. I manually tested deploying to the Test PyPi tiers and then tested publishing manually to the actual tier. Here is the PyPi page showing that publish was successful: https://pypi.org/project/nisystemlink-examples/
Checklist