Update README for conda-forge #277
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: Conda Build | |
on: [push] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set PlantSeg version name | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Print PlantSeg version name | |
run: | | |
echo $RELEASE_VERSION | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
channels: local,conda-forge,defaults | |
channel-priority: false | |
- shell: bash -l {0} | |
run: | | |
conda info --envs | |
- name: Build PlantSeg | |
shell: bash -l {0} | |
run: | | |
conda install -q conda-build | |
conda build -c conda-forge conda-recipe | |
- name: Create PlantSeg env | |
run: | | |
conda create -n plant-seg -c local -c conda-forge plantseg pytest | |
- name: Run pytest | |
shell: bash -l {0} | |
run: | | |
conda activate plant-seg | |
pytest | |
conda deactivate | |
- name: Deploy on conda | |
if: ${{ startsWith( github.ref, 'refs/tags/') && success() }} | |
env: | |
ANACONDA_SECRET: ${{ secrets.ANACONDA_TOKEN }} | |
shell: bash -l {0} | |
run: | | |
conda install -q anaconda-client | |
anaconda -t $ANACONDA_SECRET upload $CONDA/conda-bld/**/plantseg-*.tar.bz2 |