feat: add pixi publish command for building and uploading packages#5678
Merged
ruben-arts merged 22 commits intomainfrom Mar 26, 2026
Merged
feat: add pixi publish command for building and uploading packages#5678ruben-arts merged 22 commits intomainfrom
pixi publish command for building and uploading packages#5678ruben-arts merged 22 commits intomainfrom
Conversation
Add a new `pixi publish` command that combines `pixi build` and `pixi upload` into a single workflow, similar to `rattler-build publish`. The command builds conda packages from a manifest and uploads them to a target channel specified via the `--to` flag. Supported backends: - prefix.dev (https://prefix.dev/<channel>) - anaconda.org (https://anaconda.org/<owner>/<label>) - S3 (s3://bucket-name) with automatic channel initialization and indexing - Local filesystem (file:///path/to/channel) with automatic indexing - Quetz (quetz://server/<channel>) - Artifactory (artifactory://server/<channel>) Upload routing is adapted from rattler_build_core::publish. https://claude.ai/code/session_016n3z1PSG2UYV622ZDxwXD6
- Add auto-generated CLI reference page for `pixi publish` - Add `publish_extender` with detailed examples for all backends (prefix.dev, anaconda.org, S3, local filesystem, quetz, artifactory) - Update prefix.dev deployment guide to showcase `pixi publish` as the recommended workflow for building and publishing in one step - Update trusted publishing CI example to use `pixi publish` https://claude.ai/code/session_016n3z1PSG2UYV622ZDxwXD6
- Fix rustdoc bare URL and unclosed HTML tag warnings by wrapping URLs and angle-bracket placeholders in backticks/autolinks - Fix rustfmt formatting issues in upload_packages and determine_package_subdir - Add `pixi publish` to test_frozen_no_install_invariant test coverage - Regenerate CLI docs to reflect rustdoc changes https://claude.ai/code/session_016n3z1PSG2UYV622ZDxwXD6
pixi publish uses --path instead of --manifest-path (like pixi build), so it needs a special case in the test. Expect failure since publish will fail at the upload step (no auth/package) but the invariant check on conda-meta is what matters. https://claude.ai/code/session_016n3z1PSG2UYV622ZDxwXD6
pixi publish command for building and uploading packagespixi publish command for building and uploading packages
Member
Author
|
Test protocol:
Local file channel works and creates local index: |
Closed
Member
Author
|
I also tested with S3 and Anaconda and after the fixes in |
ruben-arts
requested changes
Mar 23, 2026
Contributor
ruben-arts
left a comment
There was a problem hiding this comment.
Some prelimenary reviews
- Add --skip-existing flag (default true) to skip uploading packages that already exist on the target channel, avoiding confusing duplicate upload messages and HTTP 409 errors - Show initial build summary listing all packages to be built with name, version, build string, and platform before starting builds - Improve build result output to include package file size and full path to the built artifact - Clear progress bars after upload completes to avoid leftover "Uploading" progress bar text in the terminal https://claude.ai/code/session_016CakNMdgLnjAjDCGnEKxmy
ruben-arts
reviewed
Mar 24, 2026
Break the build result into a structured multi-line format showing name, size, and path on separate lines instead of a single long line. Use indicatif::HumanBytes (already used elsewhere in pixi) instead of a custom format_size helper. https://claude.ai/code/session_016CakNMdgLnjAjDCGnEKxmy
Clear the progress bar lines left behind by rattler_upload after upload completes using console::Term::clear_last_lines(). Also improve the success summary to list each published package by name. https://claude.ai/code/session_016CakNMdgLnjAjDCGnEKxmy
The clear_last_lines hack exists because rattler_upload uses progress_bar.finish() instead of finish_and_clear(), leaving rendered bars on stderr. Added a clear comment explaining the upstream fix needed (3 lines in rattler_upload). https://claude.ai/code/session_016CakNMdgLnjAjDCGnEKxmy
The finish vs finish_and_clear fix should be done in rattler_upload upstream, not worked around here. https://claude.ai/code/session_016CakNMdgLnjAjDCGnEKxmy
Wrap the upload in await_in_progress so there's a pixi-managed spinner during package uploads. The spinner is properly cleared via finish_and_clear when the upload completes. https://claude.ai/code/session_016CakNMdgLnjAjDCGnEKxmy
Move per-build "Successfully built" messages out of the build loop and print a single consolidated summary after all builds complete, right before the publish phase. This gives a cleaner output flow: build plan -> build output -> build summary -> publish -> publish summary. https://claude.ai/code/session_016CakNMdgLnjAjDCGnEKxmy
Contributor
Cloudsmith? |
ruben-arts
approved these changes
Mar 26, 2026
Contributor
ruben-arts
left a comment
There was a problem hiding this comment.
Approving this as a good first version! Looking forward to making this subcommand even better in the future!
HARSHVARANDANI
pushed a commit
to HARSHVARANDANI/pixi
that referenced
this pull request
Mar 27, 2026
…refix-dev#5678) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Ruben Arts <ruben.arts@pm.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a new
pixi publishcommand that combines building and uploading conda packages in a single step. It's a convenience wrapper aroundpixi buildandpixi uploadfunctionality. This is ported from rattler-build.Key Features:
--target-platform,--build-platform,--build-dir,--clean,--path--force(overwrite existing packages),--generate-attestation(prefix.dev only)pixi authand environment variablesImplementation Details:
pixi buildcommand to compile packagesDocumentation:
pixi publishexamples and trusted publishing informationpixi build/pixi uploadworkflowHow Has This Been Tested?
The implementation leverages existing, well-tested components:
pixi buildcommandrattler_uploadandrattler_indexlibraries (existing dependencies)pixi_authinfrastructureManual testing would involve:
--forceflag behavior with existing packagesChecklist:
pixi_cli(similar tobuild.rs)https://claude.ai/code/session_016n3z1PSG2UYV622ZDxwXD6