Skip to content

rattler-build publish#

Publish packages to a channel. This command builds packages from recipes (or uses already built packages), uploads them to a channel, and runs indexing

Usage#

rattler-build publish [OPTIONS] --to <TO> [PACKAGE_OR_RECIPE]...

Arguments#

  • <PACKAGE_OR_RECIPE>
    Package files (.conda, .tar.bz2) to publish directly, or recipe files (.yaml) to build and publish. If .conda or .tar.bz2 files are provided, they will be published directly without building. If .yaml files are provided, they will be built first, then published. Use --recipe-dir (from build options below) to scan a directory for recipes instead. Defaults to "recipe.yaml" in the current directory if not specified
    May be provided more than once.
    default*: recipe.yaml

Options#

Modifying result#

  • --package-format <PACKAGE_FORMAT>
    The package format to use for the build. Can be one of tar-bz2 or conda. You can also add a compression level to the package format, e.g. tar-bz2:<number> (from 1 to 9) or conda:<number> (from -7 to 22).
  • --no-include-recipe
    Don't store the recipe in the final package
  • --test <TEST>
    The strategy to use for running tests
    options: skip, native, native-and-emulated
  • --color-build-log
    Don't force colors in the output of the build script
    default: true
  • --output-dir <OUTPUT_DIR>
    Output directory for build artifacts.
    env: CONDA_BLD_PATH
  • --skip-existing <SKIP_EXISTING>
    Whether to skip packages that already exist in any channel If set to none, do not skip any packages, default when not specified. If set to local, only skip packages that already exist locally, default when using --skip-existing. If set toall, skip packages that already exist in any channel <br>**options**:none,local,all`
  • --noarch-build-platform <NOARCH_BUILD_PLATFORM>
    Define a "noarch platform" for which the noarch packages will be built for. The noarch builds will be skipped on the other platforms
  • --debug
    Enable debug output in build scripts
  • --markdown-summary <MARKDOWN_SUMMARY>
    Write a markdown summary to the specified file (appends to the file). Useful for generating PR comments or custom reports
  • --error-prefix-in-binary
    Error if the host prefix is detected in any binary files
  • --allow-symlinks-on-windows
    Allow symlinks in packages on Windows (defaults to false - symlinks are forbidden on Windows)
  • --exclude-newer <EXCLUDE_NEWER>
    Exclude packages newer than this date from the solver, in RFC3339 format (e.g. 2024-03-15T12:00:00Z)
  • --build-num <BUILD_NUM>
    Override the build number for all outputs (defaults to the build number in the recipe)

Publishing#

  • --to <TO>
    The channel or URL to publish the package to
    required: true
  • --build-number <BUILD_NUMBER>
    Override the build number for all outputs. Use an absolute value (e.g., --build-number=12) or a relative bump (e.g., --build-number=+1). When using a relative bump, the highest build number from the target channel is used as the base
  • --force
    Force upload even if the package already exists (not recommended - may break lockfiles). Only works with S3, filesystem, Anaconda.org, and prefix.dev channels
  • --generate-attestation
    Automatically generate attestations when uploading to prefix.dev channels. Only works when uploading to prefix.dev channels with trusted publishing enabled

Sandbox arguments#