-
Notifications
You must be signed in to change notification settings - Fork 498
fix: update PyPI release workflow to trigger independently of crates.io workflow #2715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
05a8a4f
21ca040
e7b0c0e
4b7a1f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
|
|
@@ -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 | ||
| # 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. | ||
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we not skip-existing?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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 | ||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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