feat: add version bump and tag release workflows#58
Conversation
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 0b4b182 in 1 minute and 11 seconds. Click for details.
- Reviewed
145lines of code in2files - Skipped
0files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/bump-version.yml:47
- Draft comment:
Consider anchoring the grep pattern (e.g. using '^current_version') to ensure you extract the correct version. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. .github/workflows/bump-version.yml:55
- Draft comment:
Similarly, anchor the grep pattern (e.g. '^current_version') when retrieving the new version for consistency. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. .github/workflows/bump-version.yml:36
- Draft comment:
Consider pinning the bump2version package version (e.g. bump2version==x.y.z) in the pip install command for build reproducibility. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. .github/workflows/tag-release.yml:33
- Draft comment:
Use an anchored grep pattern (e.g. '^current_version') here as well to ensure precise extraction of the version. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. .github/workflows/tag-release.yml:27
- Draft comment:
Consider pinning versions for dependencies (tox, twine, wheel, setuptools) to ensure reproducible builds. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_FC6lEK6htjcPAKn8
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed 90d6df2 in 48 seconds. Click for details.
- Reviewed
135lines of code in2files - Skipped
0files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/bump-version.yml:47
- Draft comment:
Consider adding error handling in case grep fails to find a valid version in .bumpversion.cfg. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
2. .github/workflows/bump-version.yml:54
- Draft comment:
Good use of a choice input for version_part. No additional sanitization needed since allowed values are enforced. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. .github/workflows/tag-release.yml:9
- Draft comment:
Ensure the label check (contains with github.event.pull_request.labels.*.name) behaves correctly when multiple labels are present. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. .github/workflows/tag-release.yml:42
- Draft comment:
Consider verifying that release.sh exists before applying chmod, to avoid potential job failures. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. .github/workflows/tag-release.yml:45
- Draft comment:
Consider capturing and logging output from release.sh to aid debugging if the PyPI publish step fails. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_0kKNvkeRTi5cwjxT
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces automated version management and release workflows for the datapilot project. The workflows enable automatic version bumping via manual trigger and automated PyPI publishing when version bump PRs are merged.
- Adds
bump-version.ymlworkflow for manual version bumping (major/minor/patch) using bump2version - Adds
tag-release.ymlworkflow to automatically tag and publish releases to PyPI when version bump PRs are merged - Implements a two-stage release process: version bump PR creation followed by automatic tagging and publishing
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/bump-version.yml |
Workflow for creating version bump PRs with bump2version integration |
.github/workflows/tag-release.yml |
Workflow for tagging releases and publishing to PyPI on merged version bump PRs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - name: Get version from file | ||
| id: get_version | ||
| run: | |
There was a problem hiding this comment.
The version extraction assumes .bumpversion.cfg exists in the repository root, but this file may not be present if the version bump PR didn't commit it or if the file location differs. Add validation to check if the file exists before attempting to parse it, or the workflow will fail silently with an empty version.
| run: | | |
| run: | | |
| if [ ! -f .bumpversion.cfg ]; then | |
| echo "Error: .bumpversion.cfg not found in repository root." >&2 | |
| exit 1 | |
| fi |
There was a problem hiding this comment.
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
| run: ./release.sh |
There was a problem hiding this comment.
The workflow depends on an external release.sh script without documenting what this script does or what prerequisites it requires. Consider adding a comment explaining the script's purpose or linking to documentation, especially since this is a critical step in the release process.
| name: Tag Release | ||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: [main] |
suryaiyer95
left a comment
There was a problem hiding this comment.
Overall workflow is not super clear to me. I think we should only release when we tag it
jontsai
left a comment
There was a problem hiding this comment.
LFTM -- no red flags. GitHub actions are kind of hard to test, and if it doesn't work, it's not that consequential -- I'm okay with iterating
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
| run: ./release.sh |
|
|
||
| - name: Get version from file | ||
| id: get_version | ||
| run: | |
|
|
||
| - name: Get version from file | ||
| id: get_version | ||
| run: | |
There was a problem hiding this comment.
That is the case, we bump the version in a separate PR, add a label to it, when we merge that one to main, that triggers release process where a tag is created and released on PyPi |
Important
Adds GitHub Actions workflows for version bumping and tagging releases, automating version management and PyPI publishing.
bump-version.ymlto automate version bumping viabump2versionand create a pull request with updated version files.tag-release.ymlto tag releases on merged pull requests labeled withversion-bumpand publish to PyPI.bump-version.ymlallows bumpingmajor,minor, orpatchversions and updatessetup.py,docs/conf.py,src/datapilot/__init__.py, and.bumpversion.cfg.tag-release.ymlcreates a Git tag and pushes it to the repository, then executesrelease.shto publish to PyPI.This description was created by
for 90d6df2. You can customize this summary. It will automatically update as commits are pushed.