Skip to main content
Anaconda’s official GitHub Actions allow you to integrate Anaconda tools and package management into your CI/CD workflows, replacing the need for manual CLI setup or uncertified community actions.

setup-anaconda-cli

Provisions the Anaconda CLI and optional tools (like pixi) in your runner, so you can use them directly in subsequent workflow steps.

Usage example

- uses: anaconda/actions/setup-anaconda-cli@v0
  with:
    tools: anaconda-cli, pixi

Inputs

Outputs

Platform support

This action supports Linux, macOS, and Windows runners.

upload-package

Uploads conda or Python packages to any Anaconda registry. The target-type input determines where packages are published.

Usage examples

Upload a conda package to your Anaconda.org organization:
- uses: anaconda/actions/upload-package@v0
  with:
    token: ${{ secrets.ANACONDA_ORG_TOKEN }}
    channel: my-org
    packages: ./build/noarch/*.conda
Upload a Python wheel as a private package with labels:
- uses: anaconda/actions/upload-package@v0
  with:
    token: ${{ secrets.ANACONDA_ORG_TOKEN }}
    channel: my-org
    packages: ./dist/*.whl
    private: true
    labels: main,dev

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:

Full workflow example

This workflow builds a conda package on push to a version tag and publishes it to Anaconda.org:
name: Build and publish

on:
  push:
    tags:
      - 'v*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup miniconda
        uses: conda-incubator/setup-miniconda@v3
        with:
          channels: defaults

      - name: Build conda package
        shell: bash -el {0}
        run: |
          conda install -y conda-build
          conda build recipe --output-folder ./build

      - name: Upload build artifact
        uses: actions/upload-artifact@v4
        with:
          name: conda-package
          path: ./build/noarch/*.conda

  publish:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: conda-package
          path: ./dist

      - name: Publish to Anaconda.org
        uses: anaconda/actions/upload-package@v0
        with:
          token: ${{ secrets.ANACONDA_ORG_TOKEN }}
          channel: my-org
          packages: ./dist/*.conda

Migrating from existing workflows

If you’re currently using CLI commands directly in your workflows, you can replace them with the upload-package action:
Before:
- name: Install anaconda-client
  run: conda install -y anaconda-client
- name: Upload
  run: |
    anaconda --token ${{ secrets.TOKEN }} upload \
      --user my-org \
      --private \
      ./build/*.conda
After:
- uses: anaconda/actions/upload-package@v0
  with:
    token: ${{ secrets.TOKEN }}
    channel: my-org
    packages: ./build/*.conda
    private: true

Release history

For a complete list of versions and changes, see the GitHub Actions releases.