chore: add conditional execution for pre-releases and update publishing steps in workflows
All checks were successful
CI / test (3.13) (push) Successful in 41s

This commit is contained in:
Alexander Kalinovsky
2025-08-26 20:21:32 +03:00
parent 5247544bc3
commit 1e043efb6f
2 changed files with 8 additions and 13 deletions

View File

@@ -10,6 +10,9 @@ 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')
permissions:
id-token: write
contents: read
@@ -19,12 +22,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Debug info
run: |
echo "GITEA_REF: ${{ gitea.ref }}"
echo "GITEA_EVENT_NAME: ${{ gitea.event_name }}"
echo "GITEA_ACTOR: ${{ gitea.actor }}"
echo "GITEA_REPOSITORY: ${{ gitea.repository }}"
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
@@ -35,5 +32,6 @@ jobs:
uv build
- name: Publish (TestPyPI)
run: |
uv publish --repository-url https://test.pypi.org/legacy/ --skip-existing
uv pip install twine
uv run twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*

View File

@@ -10,6 +10,9 @@ 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')"
permissions:
id-token: write
contents: read
@@ -19,12 +22,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Debug info
run: |
echo "GITEA_REF: ${{ gitea.ref }}"
echo "GITEA_EVENT_NAME: ${{ gitea.event_name }}"
echo "GITEA_ACTOR: ${{ gitea.actor }}"
echo "GITEA_REPOSITORY: ${{ gitea.repository }}"
- name: Set up uv
uses: astral-sh/setup-uv@v5
with: