@@ -19,17 +19,15 @@ jobs:
1919 checks : read
2020
2121 env :
22- CONDA_NO_PLUGINS : true # 🚫 evita errores por plugins
22+ CONDA_NO_PLUGINS : true
2323 CONDA_PKGS_DIRS : ~/conda_pkgs_dir
2424
2525 steps :
26- # 1️⃣ Clonar el repositorio
2726 - name : Checkout repository
2827 uses : actions/checkout@v4
2928 with :
30- fetch-depth : 0 # necesario para git describe y tags
29+ fetch-depth : 0
3130
32- # 2️⃣ Instalar Miniforge (mamba rápido, sin plugins)
3331 - name : Set up Miniforge
3432 uses : conda-incubator/setup-miniconda@v3
3533 with :
@@ -39,54 +37,58 @@ jobs:
3937 activate-environment : " "
4038 auto-activate-base : true
4139
42- # 3️⃣ Cache de paquetes Conda (reduce drásticamente el tiempo)
4340 - name : Cache conda packages
4441 uses : actions/cache@v4
4542 with :
4643 path : ~/conda_pkgs_dir
4744 key : conda-pkgs-${{ runner.os }}-${{ hashFiles('environment.yml') }}
4845
49- # 4️⃣ Crear entorno (rápido con mamba)
5046 - name : Create conda environment
5147 run : |
5248 mamba env create -f environment.yml --quiet
5349
54- # 5️⃣ Instalar dependencias extra (si las tienes fuera del YAML)
5550 - name : Install pip dependencies
5651 run : |
5752 mamba run -n dl1dh pip install -U pydot --quiet
5853
59- # 6️⃣ Instalar herramientas de build
6054 - name : Install conda-build and anaconda-client
6155 run : |
6256 mamba install -y -c conda-forge conda-build anaconda-client
6357
64- # 7️⃣ Obtener versión del tag (ejemplo: v0.9.2 → 0.9.2)
58+ - name : Verify conda-build installation
59+ run : |
60+ source ~/miniforge3/etc/profile.d/conda.sh
61+ conda activate base
62+ which conda
63+ conda --version
64+ conda build --version || echo "conda-build not found"
65+
6566 - name : Determine version from Git tag
6667 id : git_version
6768 run : |
6869 echo "GIT_DESCRIBE_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
6970
70- # 8️⃣ Sustituir la versión en meta.yaml dinámicamente
7171 - name : Set dynamic version in meta.yaml
7272 run : |
7373 VERSION_NUMBER="${GIT_DESCRIBE_TAG#v}"
7474 echo "Setting version to $VERSION_NUMBER"
7575 sed -i "s|^{% set version.*%}|{% set version = \"$VERSION_NUMBER\" %}|" .github/conda/meta.yaml
76- grep version .github/conda/meta.yaml || true
7776
78- # 9️⃣ Build del paquete Conda
7977 - name : Build conda package
8078 run : |
79+ source ~/miniforge3/etc/profile.d/conda.sh
80+ conda activate base
81+ echo "Conda build version: $(conda build --version)"
8182 PACKAGE_FILE=$(conda build .github/conda --output)
8283 echo "Building package: $PACKAGE_FILE"
8384 conda build .github/conda --quiet
8485
85- # 🔟 Subida a Anaconda.org
8686 - name : Upload package to Anaconda.org
8787 env :
8888 ANACONDA_API_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
8989 run : |
90+ source ~/miniforge3/etc/profile.d/conda.sh
91+ conda activate base
9092 PACKAGE_FILE=$(conda build .github/conda --output)
9193 echo "Uploading package: $PACKAGE_FILE"
9294 anaconda upload "$PACKAGE_FILE" --user ctlearn-project --label main --force
0 commit comments