Skip to content
Open
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
12 changes: 0 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,3 @@ jobs:
shell: bash
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

# Trigger Python release after crate publishing completes.
# Only runs for tag pushes; for manual Python releases, use workflow_dispatch on release_python.yml directly.
release-python:
needs: [publish]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
permissions:
contents: read
id-token: write # Required for PyPI trusted publishing in the called workflow
uses: ./.github/workflows/release_python.yml
with:
release_tag: ${{ github.ref_name }}
21 changes: 13 additions & 8 deletions .github/workflows/release_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
name: Publish Python 🐍 distribution 📦 to PyPI

on:
workflow_call:
inputs:
release_tag:
description: 'Release tag (e.g., v0.4.0 or v0.4.0-rc.1)'
required: true
type: string
# Given PyPI doesn't support workflow reuse,
# this workflow independently releases PyPI artifacts rather than being called by the crates release workflow.
push:
tags:
# Trigger this workflow when tag follows the versioning format: v<major>.<minor>.<patch> OR v<major>.<minor>.<patch>-rc.<release_candidate>
# Example valid tags: v0.4.0, v0.4.0-rc.1
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"
workflow_dispatch:
inputs:
release_tag:
Expand Down Expand Up @@ -190,7 +192,7 @@ jobs:
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
version: "0.9.3"
enable-cache: true
enable-cache: false # Do not use cache for release artifacts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

switching to tags flagged this as a risk. I think its fine to turn off the cache here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yep, its good practice to not use cache for building release artifact

# Verify the wheel is abi3-compatible and installable without building from source.
# Skipped for cross-compiled targets since they share the same maturin config;
# if abi3 is broken, the native target build will catch it.
Expand Down Expand Up @@ -225,9 +227,12 @@ jobs:
pattern: wheels-*
merge-multiple: true
path: bindings/python/dist

# Note: PyPI publish must always be in the top-level workflow
# Workflow reuse is not supported by PyPI: https://github.com/pypi/warehouse/issues/11096
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
skip-existing: true
skip-existing: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we not skip-existing?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have disabled the skip existing flag as I'd like to flag when the RC will not be replaced.

will it error otherwise. we might not want that for prod run, it might block us from resuming

packages-dir: bindings/python/dist
verbose: true
Loading