Skip to content

Commit 00c6a5a

Browse files
committed
ENH: add wheels to PyPi workflow
1 parent 16bd00f commit 00c6a5a

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

.github/workflows/publish_pypi.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,34 @@
1-
name: Build and publish to PyPI
1+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
22

33
on:
44
release:
55
types: [published]
66

77
jobs:
8-
build:
9-
name: Build wheels for all supported Python versions
8+
build-n-publish:
9+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
1010
runs-on: ubuntu-latest
11+
1112
defaults:
1213
run:
1314
working-directory: ${{github.workspace}}/src/pyrad_proc/
14-
steps:
15-
- uses: actions/checkout@v3
16-
17-
- name: Set up Python (for pip/cibuildwheel)
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: "3.10"
2115

22-
- name: Install build dependencies
23-
run: python -m pip install build cibuildwheel
16+
steps:
17+
- uses: actions/checkout@master
18+
- name: Set up Python 3.10
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: "3.10"
2422

25-
- name: Build sdist
26-
run: python -m build --sdist --outdir dist
23+
- name: Install pypa/build
24+
run: python -m pip install build --user
2725

28-
- name: Build wheels with cibuildwheel
29-
run: python -m cibuildwheel --output-dir dist
30-
env:
31-
CIBW_SKIP: "cp27-* cp36-* cp37-* cp38-* cp39-* pp*"
26+
- name: Build a binary wheel and a source tarball
27+
run:
28+
python -m build --sdist --wheel --outdir ${{github.workspace}}/dist/
3229

33-
- name: Publish to PyPI
34-
if: startsWith(github.ref, 'refs/tags')
35-
uses: pypa/gh-action-pypi-publish@release/v1
36-
with:
37-
password: ${{ secrets.PYPI_API_TOKEN }}
30+
- name: Publish distribution 📦 to PyPI
31+
if: startsWith(github.ref, 'refs/tags')
32+
uses: pypa/gh-action-pypi-publish@release/v1
33+
with:
34+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)