Skip to content

Commit 08b7fb7

Browse files
chore: bump version to 0.37.0; fix release workflow to skip existing tags
Co-authored-by: Ona <no-reply@ona.com>
1 parent 4ae10de commit 08b7fb7

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,37 @@ jobs:
2626
| sed 's/.*"\(.*\)"/\1/')
2727
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
2828
29-
- name: Compute release tag
30-
id: tag
29+
- name: Check if release already exists
30+
id: check
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3133
run: |
3234
VERSION="${{ steps.version.outputs.version }}"
33-
# Append short SHA if a tag for this exact version already exists,
34-
# so rapid merges never collide on the same tag.
35-
if git rev-parse "v${VERSION}" >/dev/null 2>&1; then
36-
SHORT_SHA=$(git rev-parse --short HEAD)
37-
TAG="v${VERSION}-${SHORT_SHA}"
35+
TAG="v${VERSION}"
36+
if gh release view "$TAG" >/dev/null 2>&1; then
37+
echo "exists=true" >> "$GITHUB_OUTPUT"
38+
echo "Release $TAG already exists — skipping."
3839
else
39-
TAG="v${VERSION}"
40+
echo "exists=false" >> "$GITHUB_OUTPUT"
4041
fi
4142
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
4243
4344
- name: Build changelog
45+
if: steps.check.outputs.exists == 'false'
4446
run: |
45-
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
47+
LAST_TAG=$(git describe --tags --abbrev=0 --exclude="${{ steps.check.outputs.tag }}" 2>/dev/null || echo "")
4648
if [ -z "$LAST_TAG" ]; then
4749
git log --pretty=format:"- %s" HEAD | head -20 > /tmp/changelog.txt
4850
else
4951
git log "${LAST_TAG}..HEAD" --pretty=format:"- %s" > /tmp/changelog.txt
5052
fi
5153
5254
- name: Create GitHub Release
55+
if: steps.check.outputs.exists == 'false'
5356
env:
5457
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5558
run: |
56-
TAG="${{ steps.tag.outputs.tag }}"
59+
TAG="${{ steps.check.outputs.tag }}"
5760
gh release create "$TAG" \
5861
--title "$TAG" \
5962
--notes-file /tmp/changelog.txt \

src/agent_trace/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""agent-trace: strace for AI agents."""
22

3-
__version__ = "0.32.1"
3+
__version__ = "0.37.0"

0 commit comments

Comments
 (0)