From 5731fc8a022faff05979685caf374674ed221a38 Mon Sep 17 00:00:00 2001 From: Alexander Kalinovsky Date: Wed, 27 Aug 2025 20:29:21 +0300 Subject: [PATCH] chore: update release workflows to include 'dev' pre-release condition and enhance debug information steps --- .gitea/workflows/release-testpypi.yaml | 23 +++++++++++++++++++++-- .gitea/workflows/release.yaml | 23 +++++++++++++++++++++-- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release-testpypi.yaml b/.gitea/workflows/release-testpypi.yaml index d90d91f..5be47e1 100644 --- a/.gitea/workflows/release-testpypi.yaml +++ b/.gitea/workflows/release-testpypi.yaml @@ -10,8 +10,10 @@ on: jobs: build-publish: - # Only run on pre-releases (alpha, beta, rc) - if: contains(gitea.ref, 'rc') || contains(gitea.ref, 'a') || contains(gitea.ref, 'b') + # Only run on pre-releases (alpha, beta, rc, dev) + # This workflow handles: v0.1.0rc1, v1.0.0a1, v2.3.4b2, v0.1.0dev1, etc. + # IMPORTANT: This should NEVER run for stable releases like v0.1.0 + if: contains(gitea.ref, 'rc') || contains(gitea.ref, 'a') || contains(gitea.ref, 'b') || contains(gitea.ref, 'dev') permissions: id-token: write @@ -26,6 +28,23 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + + - name: Debug release info + run: | + echo "🔍 Release Debug Information:" + echo "Tag/Ref: ${{ gitea.ref }}" + echo "Tag name: ${{ gitea.ref_name }}" + echo "Repository: ${{ gitea.repository }}" + echo "Event type: ${{ gitea.event_name }}" + echo "Workflow: TestPyPI" + + echo "" + echo "📋 Condition Check:" + echo "Contains 'rc': ${{ contains(gitea.ref, 'rc') }}" + echo "Contains 'a': ${{ contains(gitea.ref, 'a') }}" + echo "Contains 'b': ${{ contains(gitea.ref, 'b') }}" + echo "Contains 'dev': ${{ contains(gitea.ref, 'dev') }}" + echo "Should run: ${{ contains(gitea.ref, 'rc') || contains(gitea.ref, 'a') || contains(gitea.ref, 'b') || contains(gitea.ref, 'dev') }}" - name: Set up uv uses: astral-sh/setup-uv@v5 with: diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 9e5f2cf..8b725ce 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -10,8 +10,10 @@ on: jobs: build-publish: - # Only run on stable releases (not alpha, beta, rc) - if: "!contains(gitea.ref, 'rc') && !contains(gitea.ref, 'a') && !contains(gitea.ref, 'b')" + # Only run on stable releases (not alpha, beta, rc, dev) + # This workflow handles: v0.1.0, v1.0.0, v2.3.4, etc. + # IMPORTANT: This should be the ONLY workflow that runs for stable releases + if: "!contains(gitea.ref, 'rc') && !contains(gitea.ref, 'a') && !contains(gitea.ref, 'b') && !contains(gitea.ref, 'dev')" permissions: id-token: write @@ -25,6 +27,23 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + + - name: Debug release info + run: | + echo "🔍 Release Debug Information:" + echo "Tag/Ref: ${{ gitea.ref }}" + echo "Tag name: ${{ gitea.ref_name }}" + echo "Repository: ${{ gitea.repository }}" + echo "Event type: ${{ gitea.event_name }}" + echo "Workflow: Production PyPI" + + echo "" + echo "📋 Condition Check:" + echo "Contains 'rc': ${{ contains(gitea.ref, 'rc') }}" + echo "Contains 'a': ${{ contains(gitea.ref, 'a') }}" + echo "Contains 'b': ${{ contains(gitea.ref, 'b') }}" + echo "Contains 'dev': ${{ contains(gitea.ref, 'dev') }}" + echo "Should run: ${{ !contains(gitea.ref, 'rc') && !contains(gitea.ref, 'a') && !contains(gitea.ref, 'b') && !contains(gitea.ref, 'dev') }}" - name: Set up uv uses: astral-sh/setup-uv@v5 with: