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:
|
jobs:
|
||||||
build-publish:
|
build-publish:
|
||||||
|
# Only run on pre-releases (alpha, beta, rc)
|
||||||
|
if: contains(gitea.ref, 'rc') || contains(gitea.ref, 'a') || contains(gitea.ref, 'b')
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write
|
id-token: write
|
||||||
contents: read
|
contents: read
|
||||||
@@ -19,12 +22,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Set up uv
|
||||||
uses: astral-sh/setup-uv@v5
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
@@ -35,5 +32,6 @@ jobs:
|
|||||||
uv build
|
uv build
|
||||||
- name: Publish (TestPyPI)
|
- name: Publish (TestPyPI)
|
||||||
run: |
|
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:
|
jobs:
|
||||||
build-publish:
|
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:
|
permissions:
|
||||||
id-token: write
|
id-token: write
|
||||||
contents: read
|
contents: read
|
||||||
@@ -19,12 +22,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Set up uv
|
||||||
uses: astral-sh/setup-uv@v5
|
uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user