Skip to content

Update pre-commit hooks #9

Update pre-commit hooks

Update pre-commit hooks #9

Workflow file for this run

name: Publish to PyPI
on:
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: build wheel
strategy:
fail-fast: false
matrix:
python-version: ['cp312', 'cp311']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build wheel for ${{ matrix.python-version }}
run: |
pip install build
python -m build --wheel
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.python-version }}
path: ./dist/*.whl
upload:
name: Upload wheels to PYPI
runs-on: ubuntu-latest
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch')
needs: [build]
environment:
name: pypi
url: https://pypi.org/p/pyforc
permissions:
id-token: write
steps:
- name: Retrieve wheels and sdist
uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
path: wheels/
- name: List all built wheels
run: |
ls -lAs wheels/
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.8
with:
packages_dir: wheels/