Skip to content

improve coverage config (#39) #25

improve coverage config (#39)

improve coverage config (#39) #25

Workflow file for this run

name: Publish to PyPI
on:
pull_request:
push:
branches:
- main
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-tags: true
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: "3.x"
- name: Install build tools
run: python -m pip install --upgrade pip wheel setuptools build twine
- name: Build wheels
run: python -m build --sdist --wheel . --outdir dist
- name: Check wheels
working-directory: dist
run: |
ls -alh
python -m pip install *.whl
python -m twine check *
- name: Upload release distributions
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: release-dists
path: dist/
publish:
runs-on: ubuntu-latest
if: github.event_name == 'release'
needs: [build]
permissions:
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14