Skip to content

Commit 8a11a97

Browse files
committed
Update publish workflows and add TestPyPI index config
Updated GitHub Actions workflows to use compatible action versions and improved steps for publishing to PyPI and TestPyPI. Added explicit TestPyPI index configuration to pyproject.toml for uv publishing.
1 parent 524aab1 commit 8a11a97

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

.github/workflows/publish.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v6
12+
- uses: actions/checkout@v2
13+
1414
- name: Install uv
15-
uses: astral-sh/setup-uv@v7
16-
- name: Build
17-
run: uv build
18-
- name: Publish to PyPI
19-
run: uv publish
15+
uses: astral-sh/setup-uv@v6
16+
17+
- name: Publish Package
2018
env:
2119
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
20+
run: |
21+
uv build
22+
uv publish

.github/workflows/test-publish.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v6
10+
- uses: actions/checkout@v2
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.11'
1116

1217
- name: Install uv
13-
uses: astral-sh/setup-uv@v7
14-
- name: Build
15-
run: uv build
16-
- name: Publish to TestPyPI
17-
run: uv publish --publish-url https://test.pypi.org/legacy/
18+
uses: astral-sh/setup-uv@v6
19+
20+
- name: Publish Package
1821
env:
19-
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
22+
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
23+
run: |
24+
uv build
25+
uv publish --index testpypi

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,9 @@ default-groups = ["excel"]
5050
[build-system]
5151
requires = ["hatchling"]
5252
build-backend = "hatchling.build"
53+
54+
[[tool.uv.index]]
55+
explicit = true
56+
name = "testpypi"
57+
publish-url = "https://test.pypi.org/legacy/"
58+
url = "https://test.pypi.org/simple/"

0 commit comments

Comments
 (0)