Skip to content

Update CI to tag release, and release 0.2.0#6

Merged
gregnazario merged 2 commits into
mainfrom
update-ci
Apr 6, 2026
Merged

Update CI to tag release, and release 0.2.0#6
gregnazario merged 2 commits into
mainfrom
update-ci

Conversation

@gregnazario
Copy link
Copy Markdown
Collaborator

No description provided.

@gregnazario gregnazario merged commit 3ff05fa into main Apr 6, 2026
5 checks passed
@gregnazario gregnazario deleted the update-ci branch April 6, 2026 23:55
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 bumps the Python SDK to version 0.2.0 and updates the PyPI publish GitHub Actions workflow to also create a corresponding Git tag when a new version is published.

Changes:

  • Bump package version to 0.2.0 in project metadata and lockfile.
  • Extend the PyPI publish workflow to emit the local version as an output and tag the release.
  • Adjust GitHub Actions permissions to allow pushing tags.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
pyproject.toml Updates the package version metadata to 0.2.0.
uv.lock Updates the editable package entry version to 0.2.0.
.github/workflows/pypi_publish.yml Adds version output + a “Tag release” step and elevates contents permission for tag pushing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 8 to 10
permissions:
contents: read
contents: write
id-token: write # required for PyPI trusted publishing (OIDC)
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing workflow permissions to contents: write grants repo write access to the whole job. Since this is only needed for tagging, consider splitting tagging into a separate job (dependent on publish) with contents: write, keeping the publish/build job at contents: read to follow least-privilege and reduce blast radius if a step/action is compromised.

Copilot uses AI. Check for mistakes.
Comment on lines +70 to +71
git tag "v${{ steps.version.outputs.version }}"
git push origin "v${{ steps.version.outputs.version }}"
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tagging commands will fail on workflow re-runs or if the tag already exists remotely (e.g., git tag errors locally or git push is rejected), which can leave the package published but the workflow marked failed. Add an existence check (local+remote) and skip tagging if v<version> already exists, or make the push logic explicitly idempotent.

Suggested change
git tag "v${{ steps.version.outputs.version }}"
git push origin "v${{ steps.version.outputs.version }}"
TAG="v${{ steps.version.outputs.version }}"
if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
echo "Tag $TAG already exists locally; skipping tag creation."
exit 0
fi
if git ls-remote --exit-code --tags origin "refs/tags/$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists on origin; skipping tag push."
exit 0
fi
git tag "$TAG"
git push origin "$TAG"

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
[project]
name = "decibel-python-sdk"
version = "0.1.2"
version = "0.2.0"
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[project].version is now 0.2.0, but the package exports decibel.__version__ from src/decibel/_version.py, which is currently set to 0.1.0. This will cause the runtime-reported version to disagree with the published package version; update the exported version source to stay in sync (or derive it from package metadata).

Suggested change
version = "0.2.0"
version = "0.1.0"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants