Skip to content

chore: configure publisher workflow for the trusted publisher approach #1

chore: configure publisher workflow for the trusted publisher approach

chore: configure publisher workflow for the trusted publisher approach #1

Workflow file for this run

name: Python Package
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
uv python install 3.12
uv sync --all-extras
- name: Run tests
run: make test
- name: Build package
run: make build
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1