Skip to content
package

GitHub Action

Publish Conda package to Anaconda.org using custom channels for build

v0.0.11 Latest version

Publish Conda package to Anaconda.org using custom channels for build

package

Publish Conda package to Anaconda.org using custom channels for build

Build and Publish conda package to Anaconda

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Publish Conda package to Anaconda.org using custom channels for build

uses: Old-Shatterhand/publish-conda-multichannel-action@v0.0.11

Learn more about this action in Old-Shatterhand/publish-conda-multichannel-action

Choose a version

Publish Anaconda Package

A Github Action to publish your software package to an Anaconda repository.

Example workflow to publish to conda every time you make a new release

name: publish_conda

on:
  release:
    types: [published]
    
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: publish-to-conda
      uses: Old-Shatterhand/publish-conda-multichannel-action@v0.0.10
      with:
        subDir: 'conda'
        AnacondaToken: ${{ secrets.ANACONDA_TOKEN }}
        Channels: 'pytorch,rdkit'
        Versions: '3.8,3.11'
        Platforms: 'osx-64,win-64'

Example project structure

.
├── LICENSE
├── README.md
├── myproject
│   ├── __init__.py
│   └── myproject.py
├── conda
│   ├── build.sh
│   └── meta.yaml
├── .github
│   └── workflows
│       └── publish_conda.yml
├── .gitignore

ANACONDA_TOKEN

  1. Get an Anaconda token (with read and write API access) at anaconda.org/USERNAME/settings/access
  2. Add it to the Secrets of the Github repository as ANACONDA_TOKEN

Build Channels

By Default, this Github Action will search for conda build dependancies (on top of the standard channels) in conda-forge and bioconda