Python: Simplify pipeline, config, add a sequencer class (#113) #221
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to PyPI.org | |
| on: | |
| release: | |
| types: [published] | |
| push: | |
| branches: ["master"] | |
| jobs: | |
| cibuildwheel: | |
| name: Build py wheels on ${{ matrix.os }} | |
| env: | |
| GIT_LFS_SKIP_SMUDGE: 1 | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2022, macos-15] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build test wheels (only PRs) | |
| if: github.event_name != 'release' | |
| uses: pypa/cibuildwheel@v3.3.1 | |
| env: # build 1 build per platform just to make sure we can do it later when releasing | |
| CIBW_BUILD: "cp312-*" | |
| with: | |
| package-dir: ${{github.workspace}}/ | |
| - name: Build all wheels (release) | |
| if: github.event_name == 'release' | |
| uses: pypa/cibuildwheel@v3.3.1 | |
| with: | |
| package-dir: ${{github.workspace}}/ | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: artifact-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| pypi: | |
| name: Publish wheels to PyPI | |
| if: github.event_name == 'release' | |
| needs: [cibuildwheel] | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| pattern: artifact* | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 |