Skip to content

Commit d0e0365

Browse files
committed
Add job to build sdist and upload to pypi on release builds
1 parent 695d183 commit d0e0365

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/wheels.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build wheels and sdist and upload to PyPI
22

33
on:
44
workflow_dispatch:
@@ -26,3 +26,37 @@ jobs:
2626
- uses: actions/upload-artifact@v2
2727
with:
2828
path: ./wheelhouse/*.whl
29+
30+
build_sdist:
31+
# Just need to build sdist on a single machine
32+
runs-on: ubuntu-latest
33+
python-version: 3.8
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
- uses: actions/setup-python@v2
38+
- name: Install fftw
39+
run: |
40+
yum install -y fftw-devel
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install -U pip
44+
pip install -U numpy seuptools
45+
pip install -U -r requirements.txt
46+
47+
- uses: actions/download-artifact@v2
48+
with:
49+
path: ./dist
50+
51+
- name: Build sdist
52+
run: |
53+
python setup.py sdist
54+
ls -l dist
55+
tar tvfz dist/GalSim-*.tar.gz
56+
57+
- name: Publish to PyPI
58+
uses: pypa/gh-action-pypi-publish@release/v1
59+
with:
60+
user: rmjarvis
61+
password: ${{ secrets.PYPI_PASSWORD }}
62+
verbose: true

0 commit comments

Comments
 (0)