Skip to content

Commit 2a717fc

Browse files
fix: add package metadata for PyPI publication
1 parent 5fc7310 commit 2a717fc

1 file changed

Lines changed: 13 additions & 41 deletions

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,25 @@ on:
44
push:
55
tags:
66
- 'v*.*.*'
7-
8-
permissions:
9-
id-token: write
10-
contents: read
7+
workflow_dispatch:
118

129
jobs:
13-
release-build:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v4
17-
18-
- name: Install uv
19-
uses: astral-sh/setup-uv@v4
20-
21-
- name: Set up Python
22-
uses: actions/setup-python@v5
23-
with:
24-
python-version: "3.10"
25-
26-
- name: Build release distributions
27-
run: |
28-
uv build --verbose
29-
ls -lh dist
30-
unzip -p dist/*.whl | head -20
31-
32-
- name: Upload release distributions
33-
uses: actions/upload-artifact@v4
34-
with:
35-
name: release-dists
36-
path: dist/
37-
3810
pypi-publish:
11+
name: Upload to PyPI
3912
runs-on: ubuntu-latest
40-
needs: release-build
4113
permissions:
42-
id-token: write
14+
id-token: write # For PyPI's trusted publishing
4315
steps:
44-
- name: Retrieve release distributions
45-
uses: actions/download-artifact@v4
16+
- name: Checkout
17+
uses: actions/checkout@v5
4618
with:
47-
name: release-dists
48-
path: dist/
19+
fetch-depth: 0
20+
21+
- name: "Install uv"
22+
uses: astral-sh/setup-uv@v6
4923

50-
- name: Inspect wheel before publish
51-
run: |
52-
ls -lh dist
53-
unzip -p dist/*.whl | head -20
24+
- name: Build
25+
run: uv build
5426

55-
- name: Publish release distributions to PyPI
56-
uses: pypa/gh-action-pypi-publish@v1.8.14
27+
- name: Publish to PyPi
28+
run: uv publish -v dist/*

0 commit comments

Comments
 (0)