Skip to content

v0.3.0

v0.3.0 #8

Workflow file for this run

# based on https://simonwillison.net/2021/Nov/4/publish-open-source-python-library/
name: publish python package
on:
release:
types: [created]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml','**/requirements/core.txt', '**/requirements/test.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
make install-gh-test
- name: Run tests
run: |
pytest -v
deploy:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: actions/cache@v3
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-publish-pip-${{ hashFiles('**/pyproject.toml','**/requirements/core.txt', '**/requirements/publish.txt') }}
restore-keys: |
${{ runner.os }}-publish-pip-
- name: Install dependencies
run: |
make install-gh-publish
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m build
twine upload dist/*