Skip to content

Upload Python Package to PyPI when a Release is Created #2

Upload Python Package to PyPI when a Release is Created

Upload Python Package to PyPI when a Release is Created #2

Workflow file for this run

name: Upload Python Package to PyPI when a Release is Created
on:
release:
types: [created]
jobs:
pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/rag-metrics
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- name: Build Package
run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1