Add action to build and upload package to anaconda #1
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
name: Build and Upload Conda Package | |
on: | |
workflow_run: | |
workflows: ["Upload package to PyPI"] | |
types: | |
- completed | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-upload-conda-package: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: 3.9 | |
- name: Build and Upload Conda package | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
run: | | |
cd recipe | |
conda-build . --token $ANACONDA_TOKEN --user tcevaer |