feat: add support for python 3.14 (#22)

* feat: add support for python 3.14

* chore: migrate to poetry 2

* fix: more tweaks for py314; use uv

---------

Co-authored-by: Ted Conbeer <tconbeer@users.noreply.github.com>
This commit is contained in:
Branch Vincent 2025-10-29 12:55:57 -07:00 committed by GitHub
commit 463e6f9330
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1660 additions and 1624 deletions

View file

@ -11,37 +11,44 @@ jobs:
publish-package:
if: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v') }}
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
steps:
- name: Check out the main branch
uses: actions/checkout@v4
- name: Check out repo main branch
uses: actions/checkout@v5
with:
ref: main
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: 1.6.1
- name: Configure poetry
run: poetry config --no-interaction pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Get this package's Version
id: package_version
run: echo "package_version=$(poetry version --short)" >> $GITHUB_OUTPUT
version: "0.9.3"
- name: Get project Version
id: project_version
run: echo "project_version=$(uv version --short)" >> $GITHUB_OUTPUT
- name: Build package
run: poetry build --no-interaction
run: uv build --all-packages
- name: Publish package to PyPI
run: poetry publish --no-interaction
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create a Github Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.package_version.outputs.package_version }}
tag_name: v${{ steps.project_version.outputs.project_version }}
target_commitish: main
token: ${{ secrets.GH_RELEASE_TOKEN }}
body_path: CHANGELOG.md
files: |
LICENSE
dist/*harlequin*.whl
dist/*harlequin*.tar.gz
dist/**.whl
dist/**.tar.gz

View file

@ -15,39 +15,46 @@ jobs:
pull-requests: write
steps:
- name: Check out the main branch
uses: actions/checkout@v4
- name: Check out repo main branch
uses: actions/checkout@v5
with:
ref: main
- name: Set up Python 3.10
uses: actions/setup-python@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: 1.6.1
version: "0.9.3"
- name: Create release branch
run: |
git checkout -b release/v${{ github.event.inputs.newVersion }}
git push --set-upstream origin release/v${{ github.event.inputs.newVersion }}
- name: Bump version
run: poetry version ${{ github.event.inputs.newVersion }} --no-interaction
run: uv version ${{ github.event.inputs.newVersion }}
- name: Ensure package can be built
run: poetry build --no-interaction
run: uv build --all-packages
- name: Update CHANGELOG
uses: thomaseizinger/keep-a-changelog-new-release@v1
uses: thomaseizinger/keep-a-changelog-new-release@v3
with:
version: ${{ github.event.inputs.newVersion }}
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: Bumps version to ${{ github.event.inputs.newVersion }}
- name: Create pull request into main
uses: thomaseizinger/create-pull-request@1.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: thomaseizinger/create-pull-request@1.4.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
head: release/v${{ github.event.inputs.newVersion }}
base: main
title: v${{ github.event.inputs.newVersion }}