Skip to content

DEP: drop support for CPython 3.10 #248

DEP: drop support for CPython 3.10

DEP: drop support for CPython 3.10 #248

Workflow file for this run

name: CD
on:
push:
tags: v*
pull_request:
paths:
- .github/workflows/cd.yml
- README.md
- ./**/pyproject.toml
- ./**/conftest.py
permissions: {}
jobs:
pre-publish-checks:
runs-on: ubuntu-latest
name: pre-publication checks
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: false
- run: uv run scripts/pre_publish_checks.py
build:
name: Build artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: true
cache-suffix: build
- name: Build distributions
shell: bash -l {0}
run: uv build --package inifix
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: artifacts
path: dist
test-sdist:
name: Test source distribution
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
python-version: '3.11'
enable-cache: true
prune-cache: false
cache-suffix: test-sdist
- run: uv sync --only-group test
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: artifacts
path: dist
- name: test source distribution in isolation
run: |
tar xzf dist/*.tar.gz
cd inifix-*
uv pip install .
uv run --no-project pytest --color=yes -ra
pypi-publish:
name: Publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [pre-publish-checks, test-sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/inifix
permissions:
id-token: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: artifacts
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0