Skip to content

Commit bd0638a

Browse files
authored
Update release_conda.yml
1 parent 220b065 commit bd0638a

File tree

1 file changed

+16
-38
lines changed

1 file changed

+16
-38
lines changed

.github/workflows/release_conda.yml

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20,73 +20,51 @@ jobs:
2020
checks: read
2121

2222
steps:
23-
# 1️⃣ Clonar el repositorio
2423
- name: Checkout repository
2524
uses: actions/checkout@v3
2625
with:
2726
fetch-depth: 0 # necesario para git describe y tags
2827

29-
# 2️⃣ Instalar Miniconda (sin tocar el entorno base)
3028
- name: Set up Miniconda
3129
uses: conda-incubator/setup-miniconda@v3
3230
with:
3331
miniconda-version: latest
3432
auto-update-conda: true
35-
use-mamba: false # usa solver clásico
36-
activate-environment: build
37-
environment-file: environment.yml
38-
auto-activate-base: false
33+
use-mamba: false
3934

40-
# 3️⃣ Configurar canales y solver
41-
- name: Configure Conda
42-
shell: bash -l {0}
35+
- name: Create conda environment (conda packages only)
4336
run: |
44-
conda config --add channels conda-forge
45-
conda config --add channels defaults
46-
conda config --set channel_priority strict
47-
conda config --set always_yes true
48-
conda config --set report_errors false
49-
# Instalar libmamba si disponible (no rompe en classic)
50-
conda install -n build conda-libmamba-solver -c conda-forge || true
51-
echo "✅ Conda configured successfully."
37+
CONDA_NO_PLUGINS=true conda config --set channel_priority flexible
38+
CONDA_NO_PLUGINS=true conda env create -f environment.yml --solver classic --quiet
39+
40+
- name: Install pip dependencies
41+
run: |
42+
CONDA_NO_PLUGINS=true conda run -n dl1dh pip install pydot --upgrade --quiet
5243
53-
# 4️⃣ Instalar herramientas de build
5444
- name: Install conda-build and anaconda-client
55-
shell: bash -l {0}
5645
run: |
57-
conda install -n build -c conda-forge conda-build anaconda-client -y --solver classic
58-
echo "✅ Build tools installed."
46+
CONDA_NO_PLUGINS=true conda install -c conda-forge conda-build anaconda-client -y --solver classic
5947
60-
# 5️⃣ Obtener versión desde el tag de Git
6148
- name: Determine version from Git tag
6249
id: git_version
6350
run: |
6451
echo "GIT_DESCRIBE_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
6552
66-
# 6️⃣ Sustituir versión en meta.yaml dinámicamente
6753
- name: Set dynamic version in meta.yaml
68-
shell: bash -l {0}
6954
run: |
70-
VERSION_NUMBER="${GIT_DESCRIBE_TAG#v}" # elimina la 'v' inicial
55+
VERSION_NUMBER="${GIT_DESCRIBE_TAG#v}"
7156
sed -i "s|^{% set version.*%}|{% set version = \"$VERSION_NUMBER\" %}|" .github/conda/meta.yaml
72-
echo "✅ Version set to $VERSION_NUMBER"
7357
74-
# 7️⃣ Construir el paquete Conda
7558
- name: Build conda package
76-
shell: bash -l {0}
7759
run: |
78-
PACKAGE_FILE=$(conda build .github/conda --output)
79-
echo "📦 Package will be built at: $PACKAGE_FILE"
80-
conda build .github/conda
81-
echo "✅ Package built successfully."
60+
PACKAGE_FILE=$(CONDA_NO_PLUGINS=true conda build .github/conda --output)
61+
echo "Package will be built at: $PACKAGE_FILE"
62+
CONDA_NO_PLUGINS=true conda build .github/conda --quiet
8263
83-
# 8️⃣ Subir el paquete a Anaconda.org
8464
- name: Upload package to Anaconda.org
85-
shell: bash -l {0}
8665
env:
8766
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
8867
run: |
89-
PACKAGE_FILE=$(conda build .github/conda --output)
90-
echo "🚀 Uploading package: $PACKAGE_FILE"
91-
anaconda upload "$PACKAGE_FILE" --user ctlearn-project --label main --force
92-
echo "✅ Upload completed successfully."
68+
PACKAGE_FILE=$(CONDA_NO_PLUGINS=true conda build .github/conda --output)
69+
echo "Uploading package: $PACKAGE_FILE"
70+
CONDA_NO_PLUGINS=true anaconda upload "$PACKAGE_FILE" --user ctlearn-project --label main --force

0 commit comments

Comments
 (0)