Skip to content

Commit 25f03b7

Browse files
Platform-specific wheels?
1 parent e4b1c3e commit 25f03b7

1 file changed

Lines changed: 35 additions & 8 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
types: [created]
1010

1111
jobs:
12-
build-package:
13-
name: Build package on ${{ matrix.os }}
12+
build-wheels:
13+
name: Build wheel on ${{ matrix.os }}
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
@@ -28,21 +28,48 @@ jobs:
2828
run: |
2929
python -m pip install --upgrade pip
3030
pip install build
31-
- name: Build package
31+
- name: Build wheel
3232
env:
3333
PYTHONPATH: ${{ github.workspace }}
3434
run: |
35-
python -m build
36-
- name: Upload distributions
35+
python -m build --wheel
36+
- name: Upload wheel
3737
uses: actions/upload-artifact@v4
3838
with:
3939
name: dist-${{ matrix.os }}
40-
path: dist/*
40+
path: dist/*.whl
41+
42+
build-sdist:
43+
name: Build sdist
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
submodules: recursive
50+
- name: Set up Python
51+
uses: actions/setup-python@v5
52+
with:
53+
python-version: "3.12"
54+
- name: Install dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
pip install build
58+
- name: Build sdist
59+
env:
60+
PYTHONPATH: ${{ github.workspace }}
61+
run: |
62+
python -m build --sdist
63+
- name: Upload sdist
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: dist-sdist
67+
path: dist/*.tar.gz
4168

4269
pypi-publish:
43-
name: Publish package to PyPI
70+
name: Publish to PyPI
4471
runs-on: ubuntu-latest
45-
needs: build-package
72+
needs: [build-wheels, build-sdist]
4673
environment:
4774
name: pypi
4875
url: https://pypi.org/p/hwcomponents-cacti

0 commit comments

Comments
 (0)