Skip to content

Commit 6bb893e

Browse files
committed
Fix publish workflow: delete remote tag before pushing
Signed-off-by: Phillip Sitbon <phillip.sitbon@gmail.com>
1 parent 6b0b199 commit 6bb893e

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,17 @@ jobs:
8787
git log magg/latest..${{ github.sha }} >> $GITHUB_ENV
8888
echo "EOF" >> $GITHUB_ENV
8989
90-
# Update the latest tag to point to the current commit
90+
# Delete remote latest tag FIRST (before creating new one)
91+
git push origin :refs/tags/magg/latest || true
92+
93+
# Now create the new latest tag locally
9194
git tag -d magg/latest || true
9295
git tag --no-sign magg/latest
9396
9497
- name: Push changes back to main
9598
run: |
9699
git push origin main
97100
git push origin --tags
98-
# Also push the updated latest tag (force in case it exists)
99-
git push origin magg/latest --force
100101
101102
- name: Create GitHub Release
102103
uses: softprops/action-gh-release@v2

pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "magg"
3-
version = "0.4.1.30"
3+
version = "0.4.2.0"
44
requires-python = ">=3.13"
55
description = "MCP Aggregator"
66
authors = [{ name = "Phillip Sitbon", email = "phillip.sitbon@gmail.com"}]
@@ -90,7 +90,7 @@ build.sequence = [
9090
]
9191

9292
sync-git-version.shell = """
93-
VERSION=$(echo -n $(uv version --short) | sed 's/\\(\\.\\)[0-9]*$/\\.'"$(poe -q git rev-list --count HEAD)"'/')
93+
VERSION=$(echo -n $(uv version --short) | sed 's/\\(\\.\\)[0-9]*$/\\.'"$(git rev-list --count HEAD)"'/')
9494
uv version $VERSION
9595
git add pyproject.toml uv.lock
9696
"""
@@ -100,6 +100,11 @@ echo '[Automatic] Release Version' v$(uv version --short) from $(git show --pret
100100
"""
101101

102102
verified-publish-commit.shell = """
103+
# Check if there are any changes to commit
104+
if [ -z "$(git status --porcelain)" ]; then
105+
echo "Error: No changes to commit. Version may not have been updated properly."
106+
exit 1
107+
fi
103108
git commit -s -S -m "$(poe -q publish-commit-message)"
104109
git tag -s -m "$(poe -q publish-commit-message)" magg/v$(uv version --short)
105110
"""

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)