name: "Build and Publish" on: release: types: [published] workflow_dispatch: jobs: build_wheels: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} environment: release permissions: id-token: write strategy: matrix: os: [ubuntu-latest, windows-latest, macos-13, macos-14] steps: - uses: actions/checkout@v4 # Used to host cibuildwheel - uses: actions/setup-python@v5 - name: Install cibuildwheel run: python -m pip install cibuildwheel - name: Build wheels run: python -m cibuildwheel --output-dir dist # to supply options, put them in 'env', like: env: CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*" CIBW_SKIP: "*_i686 *-musllinux_*" - uses: actions/upload-artifact@v4 with: name: lie_learn-${{ matrix.os }}-${{ strategy.job-index }} path: ./dist/*.whl - name: Publish package if: matrix.os == 'ubuntu-latest' uses: pypa/gh-action-pypi-publish@release/v1