Skip to content

Release

Release #7

Workflow file for this run

name: Release
on:
release:
types: [published]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel
- name: Set CIBW_PLATFORM environment variable
run: |
if ${{ startsWith(matrix.os, 'ubuntu') }}; then
export CIBW_PLATFORM=linux
elif ${{ startsWith(matrix.os, 'windows') }}; then
export CIBW_PLATFORM=windows
else
export CIBW_PLATFORM=mac
fi
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse-${{ matrix.os }}
- uses: actions/upload-artifact@v3
with:
name: wheelhouse-${{ matrix.os }}
path: ./wheelhouse-${{ matrix.os }}/*.whl
build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build sdist
run: |
python -m pip install -U pip build
python -m build --sdist
- uses: actions/upload-artifact@v3
with:
name: sdist
path: ./dist/*
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
contents:
- read

Check failure on line 73 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 73, Col: 9): A sequence was not expected
- write
steps:
- uses: actions/download-artifact@v3
with:
# By omitting the name we are downloading all the artifacts
path: ./dist/
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TEST_DEPLOY_TOKEN }}
repository-url: https://test.pypi.org/legacy/
packages-dir: ./dist/wheelhouse-*
- name: Upload Python packages for release notes
uses: softprops/action-gh-release@v1
with:
files: |
dist/wheelhouse-*/*