Update project keywords #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: on-push | |
on: [push] | |
jobs: | |
static_checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
pip install .[test] | |
- name: Lint with Pylint | |
run: pylint --score=n *.py | |
- name: Check format with Black | |
run: black --check . | |
- name: Check import statement order with isort | |
run: isort --check . | |
- name: Check spelling | |
run: git ls-files -z | xargs -0 -- codespell | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
# python3-build is broken on 22.04: | |
# https://bugs.launchpad.net/ubuntu/+source/python-build/+bug/1992108 | |
# install everything from pip instead | |
pip install build twine | |
- name: Build dist packages | |
run: | | |
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) | |
python3 -m build | |
- name: Upload to PyPi | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && env.TWINE_PASSWORD != '' }} | |
run: twine upload --non-interactive dist/* |