Skip to main content
Use Anaconda’s GitHub Actions to install tools and publish packages in CI/CD workflows. The examples install the latest Anaconda CLI. The GitHub Actions themselves are pinned to 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

Store an anaconda.com API key as the 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). The target-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.
Upload a conda package to your Anaconda.org organization:
Upload a Python wheel as a private package with labels:

Authentication

The upload-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.

Inputs

The following inputs apply only when target-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 in recipe/ 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 the upload-package action. Run the setup sequence before the replacement upload step so it uses the latest CLI:
Before:
After:

Release history

For action versions and changes, see the GitHub Actions releases. For the implementation documented here, see the setup action source and upload action source.