Skip to content

Commit

Permalink
feat: publish with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
zscholl committed Feb 12, 2025
1 parent cb9bde7 commit 3769ce6
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,31 @@ on:
tags:
- 'v*'


jobs:
update-database:
publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # Required for trusted publishing

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: install build deps
run: python -m pip install -U pip build
- name: build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python
run: uv python install

- name: Install build dependencies
run: uv sync --all-extras

- name: Build the project
run: uv build

- name: Publish to PyPI
run: uv publish

0 comments on commit 3769ce6

Please sign in to comment.