Prerelease #10
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: "Prerelease" | |
# Trigger the create release workflow | |
on: | |
workflow_dispatch: | |
jobs: | |
build-sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build source distribution | |
run: python -m build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/*.tar.gz | |
if-no-files-found: error | |
build-wheels: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python: ['3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build auditwheel | |
- name: Build wheels | |
run: python -m build --wheel --outdir wheelhouse | |
- name: Repair wheels | |
run: auditwheel repair wheelhouse/*.whl -w dist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/*.whl | |
if-no-files-found: error | |
pypi-publish: | |
needs: [build-sdist, build-wheels] | |
runs-on: ubuntu-latest | |
environment: Prerelease | |
permissions: | |
id-token: write | |
steps: | |
- name: Download packages | |
uses: actions/download-artifact@v2 | |
with: | |
name: dist | |
path: dist/ | |
- name: Publish packages to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
verbose: true | |
packages_dir: dist/ |