Skip to content

scRegulate v1.0.1

scRegulate v1.0.1 #43

Workflow file for this run

name: Publish Conda Package
on:
release:
types: [published]
jobs:
build-and-upload-conda:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3.0.4
with:
environment-file: ./conda.recipe/environment.yml
activate-environment: build_env
auto-update-conda: true
use-mamba: true
channels: conda-forge,pytorch
channel-priority: strict
- name: Install conda-build and anaconda-client
shell: bash
run: |
eval "$(conda shell.bash hook)"
conda activate build_env
conda install conda-build anaconda-client -y
- name: Build conda package
shell: bash
run: |
eval "$(conda shell.bash hook)"
conda activate build_env
export GIT_TAG_NAME="${GITHUB_REF##*/}"
export GIT_TAG_NAME="${GIT_TAG_NAME#v}" # strip leading "v" if present
# Inject the version into the Python module so setuptools can read it
echo "__version__ = \"${GIT_TAG_NAME}\"" > scregulate/__version__.py
conda build conda.recipe --output-folder dist \
--channel conda-forge --channel pytorch
- name: Upload to Anaconda
shell: bash
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
eval "$(conda shell.bash hook)"
conda activate build_env
shopt -s nullglob
for file in dist/*/*.conda dist/*/*.tar.bz2; do
echo "Uploading $file"
anaconda -t "$ANACONDA_TOKEN" upload "$file" --force
done