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
All checks were successful
CI / test (3.13) (push) Successful in 41s
This commit is contained in:
@@ -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/*
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user