|
1 | | -name: Build and publish to PyPI |
| 1 | +name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | release: |
5 | 5 | types: [published] |
6 | 6 |
|
7 | 7 | 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 |
10 | 10 | runs-on: ubuntu-latest |
| 11 | + |
11 | 12 | defaults: |
12 | 13 | run: |
13 | 14 | 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" |
21 | 15 |
|
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" |
24 | 22 |
|
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 |
27 | 25 |
|
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/ |
32 | 29 |
|
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