Skip to content

Commit 850203d

Browse files
author
Daniel Barbalato
committed
Adding sdist and publish github action
1 parent 0a84372 commit 850203d

1 file changed

Lines changed: 40 additions & 1 deletion

File tree

.github/workflows/wheels.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ name: Build
33
on: [push, pull_request]
44

55
jobs:
6+
build_sdist:
7+
name: Build SDist
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v6
11+
12+
- name: Build SDist
13+
run: pipx run build --sdist
14+
15+
- name: Check metadata
16+
run: pipx run twine check dist/*
17+
18+
- uses: actions/upload-artifact@v5
19+
with:
20+
name: cibw-sdist
21+
path: dist/*.tar.gz
22+
623
build_wheels:
724
name: Build wheels on ${{ matrix.os }}
825
runs-on: ${{ matrix.os }}
@@ -37,4 +54,26 @@ jobs:
3754
- uses: actions/upload-artifact@v4
3855
with:
3956
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
40-
path: ./wheelhouse/*.whl
57+
path: ./wheelhouse/*.whl
58+
59+
60+
upload_all:
61+
name: Upload if release
62+
needs: [build_wheels, build_sdist]
63+
runs-on: ubuntu-latest
64+
if: github.event_name == 'release' && github.event.action == 'published'
65+
66+
steps:
67+
- uses: actions/setup-python@v6
68+
with:
69+
python-version: "3.x"
70+
71+
- uses: actions/download-artifact@v6
72+
with:
73+
pattern: cibw-*
74+
path: dist
75+
merge-multiple: true
76+
- uses: pypa/gh-action-pypi-publish@release/v1
77+
with:
78+
user: __token__
79+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)