Skip to content

v2.0.3

v2.0.3 #62

Workflow file for this run

# yamllint disable rule:line-length
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# yamllint enable rule:line-length
---
name: Build & Test
"on":
pull_request:
push:
branches:
- main
tags:
- "*"
jobs:
tox:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
env:
- py38
- py39
- py310
- py311
- py312
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: |
${{
matrix.env == 'py38' && '3.8' ||
matrix.env == 'py39' && '3.9' ||
matrix.env == 'py310' && '3.10' ||
matrix.env == 'py311' && '3.11' ||
'3.12'
}}
- run: python3 -m pip install --upgrade setuptools tox
- run: tox -e ${{ matrix.env }}
build:
runs-on: ubuntu-latest
needs: tox
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: python3 -m pip install --upgrade build
- run: python3 -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: build
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1