Skip to content
Merged
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
34 changes: 4 additions & 30 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Publish to PyPI

# Builds the queryweaver wheel/sdist ONCE, then publishes that exact artifact
# via PyPI Trusted Publishing (OIDC) — no API tokens are stored. The same build
# is validated on TestPyPI as a dry-run gate first, then shipped to PyPI only if
# that succeeds.
# to PyPI via Trusted Publishing (OIDC) — no API tokens are stored.
#
# One-time setup (see plan): configure a Trusted Publisher on both PyPI and
# TestPyPI for repo FalkorDB/QueryWeaver, workflow publish-pypi.yml, with the
# GitHub environments `testpypi` and `pypi` respectively.
# One-time setup: configure a Trusted Publisher on PyPI for repo
# FalkorDB/QueryWeaver, workflow publish-pypi.yml, GitHub environment `pypi`.

permissions:
contents: read
Expand Down Expand Up @@ -37,32 +34,9 @@ jobs:
name: dist
path: dist/

publish-testpypi:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[major]: The PR removes the TestPyPI dry-run stage and now publishes directly from build artifacts to PyPI. This eliminates the only pre-production validation that trusted-publisher identity, packaging metadata, and upload/check endpoints are correctly configured, so a misconfiguration now fails only at production release time.

name: Publish to TestPyPI (dry-run gate)
needs: build
runs-on: ubuntu-latest
environment: testpypi
permissions:
id-token: write # required for OIDC trusted publishing
contents: read
steps:
- uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
enable-cache: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist
path: dist/
- name: Publish to TestPyPI
run: >
uv publish
--publish-url https://test.pypi.org/legacy/
--trusted-publishing always
--check-url https://test.pypi.org/simple/

publish-pypi:
name: Publish to PyPI
needs: publish-testpypi
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
Expand Down
Loading