Skip to content

release

release #8

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run'
required: false
type: boolean
default: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build:
if: ${{ github.ref == 'refs/heads/main' }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]" -U
- name: Lint with Ruff
run: |
ruff --output-format=github .
- name: Test with Pytest
run: |
pytest .
deploy:
needs: build
runs-on: ubuntu-latest
name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]" -U
- name: Deploy
run: |
python setup.py sdist
python setup.py bdist_wheel
twine upload dist/* --skip-existing --verbose -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}