From 63f598235013891f3876f1806600cd0e0b1be636 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 13 Nov 2025 14:11:46 +0100 Subject: [PATCH] improve release workflow with tags --- .forgejo/workflows/build-deploy-prod.yaml | 3 +++ hack/bumpver-post-commit-hook.sh | 8 ++++++++ pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-deploy-prod.yaml b/.forgejo/workflows/build-deploy-prod.yaml index 53d1e32..aa9315d 100644 --- a/.forgejo/workflows/build-deploy-prod.yaml +++ b/.forgejo/workflows/build-deploy-prod.yaml @@ -12,6 +12,9 @@ on: - "pyproject.toml" - "uv.lock" workflow_dispatch: + release: + types: + - published jobs: build: diff --git a/hack/bumpver-post-commit-hook.sh b/hack/bumpver-post-commit-hook.sh index ca175bd..fdda006 100755 --- a/hack/bumpver-post-commit-hook.sh +++ b/hack/bumpver-post-commit-hook.sh @@ -138,4 +138,12 @@ if [ -f "$CHANGELOG_FILE" ]; then rm -f "$CHANGELOG_FILE" fi +# Fetch the tag that Forgejo created when we made the release +echo -e "${GREEN}Fetching tags from remote to sync the tag created by Forgejo${NC}" +if git fetch --tags; then + echo -e "${GREEN}Tags synced successfully${NC}" +else + echo -e "${YELLOW}Warning: Failed to fetch tags from remote${NC}" +fi + exit 0 diff --git a/pyproject.toml b/pyproject.toml index ef073ca..385c305 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ tag_scope = "default" pre_commit_hook = "hack/bumpver-pre-commit-hook.sh" post_commit_hook = "hack/bumpver-post-commit-hook.sh" commit = true -tag = true +tag = false push = true [tool.bumpver.file_patterns]