Build and Publish Conda Package #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow builds and uploads a conda package | |
# Preparation: | |
# - Create a recipe at /conda/meta.yaml | |
# - Visit https://anaconda.org/danionella/settings/access to create a token for read and write access and save it as ANACONDA_TOKEN secret (GitHub settings) | |
name: Build and Publish Conda Package | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [Publish Python Package] | |
types: | |
- completed | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
conda install conda-build conda-verify anaconda-client | |
- name: Build | |
run: | | |
conda build -c conda-forge --output-folder . . | |
- name: Upload | |
env: | |
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
run: | | |
$CONDA/bin/anaconda upload --label main noarch/*.tar.bz2 |