From a4183e6900d5c53bef2c3ba600ea8fffd39e16b5 Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 18 Jan 2026 00:59:08 +0300 Subject: [PATCH] Fix tag check --- .gitea/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 38258cc..d76f506 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -14,6 +14,7 @@ jobs: uses: https://git.daemonlord.ru/actions/checkout@v4 with: fetch-depth: 0 + tags: true - name: Set up JDK 17 uses: https://git.daemonlord.ru/actions/setup-java@v4 @@ -30,9 +31,11 @@ jobs: - name: Check if tag exists run: | VERSION=$(cat version.txt) - if git rev-parse "$VERSION" >/dev/null 2>&1; then + if git show-ref --tags --quiet --verify "refs/tags/$VERSION"; then + echo "Tag '$VERSION' already exists." echo "exists=true" > tag_exists.txt else + echo "Tag '$VERSION' does not exist yet." echo "exists=false" > tag_exists.txt fi @@ -40,9 +43,12 @@ jobs: run: | EXISTS=$(cat tag_exists.txt) if [ "$EXISTS" = "true" ]; then - echo "Version already released, skipping." + echo "Version already released, skipping workflow." exit 0 + else + echo "Version not released yet, continuing workflow..." fi + - name: Decode keystore run: |