Skip to content

⬆️🪝 update pre-commit hooks (#123) #377

⬆️🪝 update pre-commit hooks (#123)

⬆️🪝 update pre-commit hooks (#123) #377

Workflow file for this run

name: Deploy to PyPI
on:
release:
types: [published]
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build_wheel:
name: Build wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.10"
name: Install Python
- name: Build wheel
run: pipx run build --wheel
- name: Install wheel
run: python -m pip install --verbose dist/*.whl
- uses: actions/upload-artifact@v4
with:
name: cibw-wheel
path: dist/*.whl
build_sdist:
name: Build src distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.10"
name: Install Python
- name: Build sdist
run: pipx run build --sdist
- name: Install sdist
run: python -m pip install --verbose dist/*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheel, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: pypi
url: https://pypi.org/p/mqt.problemsolver
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1