v0.3.1 for reproducibility; action versions are independent of CLI versions.
setup-anaconda-cli
Install the Anaconda CLI on your runner for use in subsequent workflow steps. The action skips bootstrap. On a fresh runner, install ana first, authenticate, and then install any companion tools you need.Usage example
ANACONDA_API_KEY secret. This logs ana in so it can install tools. Use a separate registry token to upload packages. If you only need to install ana, omit the login and companion-tool steps until you need them.
Inputs
Outputs
The current action can return an empty
version output. To check the installed version, run ana --version in a later step instead.Platform support
The setup action supports Linux, macOS, and Windows runners with Bash and curl available. Choose a runner architecture supported by the CLI release.upload-package
Upload conda or Python packages to Anaconda.org or Package Security Manager (PSM). Thetarget-type input selects the registry.
Complete the setup sequence first to use the latest CLI and install the companion tools. The upload action skips tool installation when ana is already on PATH; without a prior setup step, it uses its own bundled CLI version instead of selecting the latest release.
Use a Linux runner for the upload examples. The upload action’s Anaconda.org support is not Windows-compatible.
Usage examples
Add one of these upload steps after the setup, login, and companion-tool installation steps above.- Anaconda.org
- Package Security Manager
Upload a conda package to your Anaconda.org organization:Upload a Python wheel as a private package with labels:
Authentication
Theupload-package action requires an API token for the registry you’re publishing to. Generate a token for your target registry, then store it as a GitHub Actions secret in your repository or organization settings.
- Anaconda.org: Generate a token with the
api:writescope. - Package Security Manager: Generate a token with Write permissions for your target channel.
Inputs
The following inputs apply only whentarget-type is anaconda.org:
For existing workflows, owner is a deprecated alias for channel, and target-type: repository is a deprecated alias for psm. Use channel and psm in new workflows. If both channel and owner are set, channel takes precedence.
Summaries containing spaces do not work correctly with action v0.3.1. Omit the
summary input and set the summary in your package metadata instead.Full workflow example
This workflow builds a conda package on push to a version tag and publishes it to Anaconda.org. It assumes your repository contains a noarch recipe inrecipe/ that produces a .conda package:
Migrating from existing workflows
If you’re currently using CLI commands directly in your workflows, you can replace them with theupload-package action. Run the setup sequence before the replacement upload step so it uses the latest CLI:
- Anaconda.org
- Package Security Manager
Before:After: