Skip to content

Test branch into main (#12) #35

Test branch into main (#12)

Test branch into main (#12) #35

name: Python Package CD
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'docs/**'
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run unit tests
run: python -m unittest discover -s tests -p 'test_*.py'
- name: Run Ruff
run: ruff check --output-format=github src
- name: Bump version and push tag
run: |
pip install --upgrade bump2version
bump2version patch --allow-dirty
- name: Build Python package
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}