|
7 | 7 | runs-on: ${{ matrix.os }} |
8 | 8 | strategy: |
9 | 9 | matrix: |
10 | | - os: [ubuntu-20.04, macOS-10.15] |
| 10 | + os: [ubuntu-latest] |
| 11 | + environment: pypi |
| 12 | + permissions: |
| 13 | + id-token: write |
11 | 14 | steps: |
12 | 15 | - uses: actions/checkout@v2 |
13 | 16 | - uses: actions/setup-python@v2 |
14 | 17 |
|
15 | 18 | - name: cibuildwheel installation |
16 | | - run: python -m pip install cibuildwheel==1.11.0 twine |
17 | | - |
18 | | - - name: Install gcc on macOS |
19 | | - if: matrix.os == 'macOS-10.15' |
20 | | - run: | |
21 | | - brew install gcc@11 |
22 | | - |
23 | | - - name: build specified wheels on macOS |
24 | | - if: matrix.os == 'macOS-10.15' |
25 | | - run: | |
26 | | - python -m cibuildwheel --output-dir dist |
27 | | - env: |
28 | | - CC: gcc-11 |
29 | | - CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* |
30 | | - CIBW_BEFORE_BUILD: python -m pip install cython |
31 | | - |
32 | | - - name: build specified wheels on ubuntu |
33 | | - if: matrix.os == 'ubuntu-20.04' |
| 19 | + run: python -m pip install cibuildwheel twine |
| 20 | + |
| 21 | + - name: build specified wheels on ubuntu-latest |
| 22 | + if: matrix.os == 'ubuntu-latest' |
34 | 23 | run: | |
35 | 24 | python -m cibuildwheel --output-dir dist |
36 | 25 | env: |
37 | | - CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* |
| 26 | + CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* |
38 | 27 | CIBW_BEFORE_BUILD: python -m pip install cython |
39 | 28 |
|
40 | | - - name: upload to PyPI |
41 | | - env: |
42 | | - TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} |
43 | | - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} |
44 | | - run: | |
45 | | - python -m twine upload --skip-existing dist/*.whl |
| 29 | + - name: Publish package distributions to PyPI |
| 30 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 31 | + with: |
| 32 | + skip-existing: true |
0 commit comments