harlequin-odbc/.github/workflows/publish.yml
Branch Vincent 463e6f9330
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>
2025-10-29 13:55:57 -06:00

54 lines
1.3 KiB
YAML

name: Build and Publish Package
on:
pull_request:
branches:
- main
types:
- closed
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 repo main branch
uses: actions/checkout@v5
with:
ref: main
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.9.3"
- name: Get project Version
id: project_version
run: echo "project_version=$(uv version --short)" >> $GITHUB_OUTPUT
- name: Build package
run: uv build --all-packages
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create a Github Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.project_version.outputs.project_version }}
target_commitish: main
token: ${{ secrets.GH_RELEASE_TOKEN }}
body_path: CHANGELOG.md
files: |
LICENSE
dist/**.whl
dist/**.tar.gz