✨ lint src files with flake8 - might introduce regression er… #157
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: release on pypi | |
on: | |
push: | |
# branches: | |
# - main | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: psf/black@stable | |
lint: | |
name: Lint with flake8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install flake8 | |
run: pip install flake8 flake8-bugbear | |
- name: Lint with flake8 | |
run: flake8 src | |
publish: | |
name: Publish package | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags') | |
needs: | |
- format | |
- lint | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install twine and build | |
run: python -m pip install --upgrade twine build | |
- name: Build | |
run: python -m build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |