Skip to content

Updated "Use __dict__ and ignore __slots__ on classes #169 #89

Updated "Use __dict__ and ignore __slots__ on classes #169

Updated "Use __dict__ and ignore __slots__ on classes #169 #89

Workflow file for this run

name: Release
on:
pull_request:
push:
tags:
- '*'
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
if: ((github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || contains(github.event.pull_request.labels.*.name, 'Build wheels'))
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install graphviz
python -m pip install pip build "twine>=3.3" -U
- name: Build package
run: python -m build --sdist --wheel .
- name: List result
run: ls -l dist
- name: Check dist
run: python -m twine check --strict dist/*
- name: Test package
run: |
cd ..
python -m venv testenv
testenv/bin/pip install pip -U
testenv/bin/pip install pytest cython sphinx-automodapi/dist/*.whl
testenv/bin/pytest sphinx-automodapi/sphinx_automodapi/tests
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}