Deploy to PYPI #26
This file contains 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: Build | ||
on: | ||
release: | ||
types: [released] | ||
workflow_dispatch: | ||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CIBW_BUILD: ${{ env.CIBW_BUILD }} | ||
Check failure on line 12 in .github/workflows/pypi.yml GitHub Actions / BuildInvalid workflow file
|
||
strategy: | ||
matrix: | ||
os: ${{ fromJSON(vars.BUILD_OS)}} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v5 | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.21.2 | ||
- name: build | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
publish: | ||
name: Publish wheels to pypi | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write | ||
needs: build_wheels | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: wheelhouse | ||
- name: copy to wheelhouse | ||
run: | | ||
mkdir wheels | ||
cp -r wheelhouse/*/*.whl wheels | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
skip-existing: true | ||
verbose: true | ||
packages-dir: wheels/ |