Skip to content

Commit d3a1820

Browse files
committed
Create job to generate sdist
Signed-off-by: Jono Yang <[email protected]>
1 parent a5697c2 commit d3a1820

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/pypi-release.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,34 @@ on:
1919
- "v*.*.*"
2020

2121
jobs:
22-
build-pypi-distribs:
23-
name: Build and upload wheels and sdist
22+
build-pypi-distribs-sdist:
23+
name: Build and upload sdist
24+
runs-on: ubuntu-24.04
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
33+
- name: Install build, twine, pkginfo, and packaging
34+
run: python -m pip install --user --upgrade build twine pkginfo packaging
35+
36+
- name: Build sdist
37+
run: python -m build --sdist --outdir dist/
38+
39+
- name: Validate sdist for Pypi
40+
run: python -m twine check dist/*
41+
42+
- name: Upload sdist
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: pypi_archives-sdist
46+
path: dist/*
47+
48+
build-pypi-distribs-wheels:
49+
name: Build and upload wheels
2450
runs-on: ubuntu-24.04
2551

2652
strategy:
@@ -56,10 +82,17 @@ jobs:
5682
create-gh-release:
5783
name: Create GH release
5884
needs:
59-
- build-pypi-distribs
85+
- build-pypi-distribs-sdist
86+
- build-pypi-distribs-wheels
6087
runs-on: ubuntu-24.04
6188

6289
steps:
90+
- name: Download sdist
91+
uses: actions/download-artifact@v4
92+
with:
93+
name: pypi_archives-sdist
94+
path: dist
95+
6396
- name: Download ubuntu-latest builds
6497
uses: actions/download-artifact@v4
6598
with:

0 commit comments

Comments
 (0)