Skip to content

[pre-commit.ci] pre-commit autoupdate #162

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #162

Workflow file for this run

name: Build and upload to PyPI
# Build on every branch push, tag push, and pull request change:
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- published
jobs:
build_wheel:
name: Build wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
publish:
needs: [build_wheel]
name: Publish to PyPI
permissions:
id-token: write
attestations: write
contents: read
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload artifacts to release
uses: softprops/action-gh-release@v2
with:
files: dist/*