conda: use flexible channel #17
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: Release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
pypi-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: sed -i "s:9999:${VERSION//*v/}:" setup.py conda/meta.yaml | ||
env: | ||
VERSION: ${{ github.ref }} | ||
- uses: actions/setup-python@v1 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
conda-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: sed -i "s:9999:${VERSION//*v/}:" setup.py conda/meta.yaml | ||
env: | ||
VERSION: ${{ github.ref }} | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniconda-version: "latest" | ||
- name: prepare | ||
run: | | ||
conda install -y anaconda-client conda-build conda-verify | ||
conda config --set anaconda_upload yes | ||
- name: build | ||
run: | | ||
cd conda | ||
conda build --user colomoto --token $ANACONDA_TOKEN -c defaults -c conda-forge -c potassco -c colomoto . | ||
env: | ||
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} |