Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Build and publish

on:
pull_request:
branches: [main]
push:
branches: [main]
tags:
- "v*"
workflow_dispatch:
Expand All @@ -22,7 +25,7 @@ jobs:

- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: "0.12.1"
version: "0.12.21"
python-version: "3.14.7"

- name: Run tests
Expand All @@ -40,7 +43,7 @@ jobs:
path: dist/

publish-testpypi:
# Tag pushes and manual runs on v* tags can publish; branch runs only build.
# Tag pushes and manual runs on v* tags can publish; branch and PR runs only build.
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ print(cost.total_cost) # 0.045
Uses [uv](https://docs.astral.sh/uv/). `make localdev` sets things up,
`make test` runs the tests, and `make dist` builds.

GitHub Actions runs the tests and builds packages for PRs targeting `main`
and pushes to `main`, without publishing. Maintainer approval is required
to run outside contributors' PR workflows.

Pushing a `v*` tag makes GitHub Actions build it and publish to TestPyPI,
then PyPI. Manually running the workflow on a `v*` tag does the same,
including publishing to real PyPI. Manual branch runs just run the checks
Expand Down
Loading