-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/workflow improvements #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Bump version to 0.3.0.dev1 - Update package metadata Version Bumped via GitHub Actions
- Create `release-prepare.yml` for automated version bumping and PR creation. - Create `release-publish.yml` for publishing releases to PyPI after merging PRs. - Remove the old `release.yml` workflow to streamline the release process. - Implement `get_next_release_version.sh` script to determine the next version based on increment type. - Add `test-publish.yml` for building and publishing development versions to TestPyPI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the workflow system by transitioning from build-style versioning to development-style versioning and splitting the release process into two separate workflows for better control and reliability.
- Migrated from "build" versioning (e.g., 0.3.0-build.1) to "dev" versioning (e.g., 0.3.0.dev1) for test releases
- Split the monolithic release workflow into separate "prepare" and "publish" workflows
- Added automated version determination script for consistent release management
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
pyproject.toml | Updates project version to development format (0.3.0.dev1) |
.github/workflows/test-publish.yml | Updates workflow name and comments to reflect dev versioning |
.github/workflows/scripts/get_next_release_version.sh | New script for automatic version determination using PyPI and git tags |
.github/workflows/scripts/get_latest_build.sh | Updates build detection logic to use dev versioning format |
.github/workflows/release.yml | Removes old monolithic release workflow |
.github/workflows/release-publish.yml | New workflow for automated publishing after PR merge |
.github/workflows/release-prepare.yml | New workflow for preparing releases with PR-based approval |
# - increment_type: The type of increment applied | ||
# - is_initial_release: Whether this is the first release | ||
|
||
set -euo pipefail # Exit on error, undefined vars, pipe failures |
Copilot
AI
Jul 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script uses 'set -euo pipefail' but later uses constructs like '|| echo ""' which can bypass the pipefail setting. Consider using explicit error handling instead of relying on command substitution with fallbacks.
Copilot uses AI. Check for mistakes.
if PYPI_DATA=$(curl -s -f "https://pypi.org/pypi/${PACKAGE_NAME}/json" 2>/dev/null); then | ||
LATEST_RELEASE_VERSION=$(echo "$PYPI_DATA" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data.get('info', {}).get('version', ''))" 2>/dev/null || echo "") |
Copilot
AI
Jul 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The curl command suppresses all error output with '2>/dev/null', making it difficult to debug network or API issues. Consider logging curl errors to help with troubleshooting.
if PYPI_DATA=$(curl -s -f "https://pypi.org/pypi/${PACKAGE_NAME}/json" 2>/dev/null); then | |
LATEST_RELEASE_VERSION=$(echo "$PYPI_DATA" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data.get('info', {}).get('version', ''))" 2>/dev/null || echo "") | |
if PYPI_DATA=$(curl -s -f "https://pypi.org/pypi/${PACKAGE_NAME}/json"); then | |
LATEST_RELEASE_VERSION=$(echo "$PYPI_DATA" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data.get('info', {}).get('version', ''))" 2>/dev/null || echo "") | |
else | |
echo "Error: Failed to fetch data from PyPI for package '${PACKAGE_NAME}'" >&2 | |
fi |
Copilot uses AI. Check for mistakes.
|
||
# Get all tags that look like semantic versions (v1.2.3 or 1.2.3) | ||
if command -v git >/dev/null 2>&1; then | ||
LATEST_TAG=$(git tag -l | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | sed 's/^v//' | sort -V | tail -n 1 || echo "") |
Copilot
AI
Jul 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command chains multiple processes unnecessarily. Consider using 'git tag -l --sort=-version:refname' with appropriate patterns to get the latest tag more efficiently.
LATEST_TAG=$(git tag -l | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | sed 's/^v//' | sort -V | tail -n 1 || echo "") | |
LATEST_TAG=$(git tag -l --sort=-version:refname 'v[0-9]*.[0-9]*.[0-9]*' | head -n 1 | sed 's/^v//' || echo "") |
Copilot uses AI. Check for mistakes.
No description provided.