Update release_conda.yml #56
Workflow file for this run
This file contains hidden or 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 Conda | |
| on: | |
| push: | |
| branches: [conda_cd] | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # 1. Configurar Miniconda y Mamba | |
| - name: Setup Miniconda and Conda Tools | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: '3.10' | |
| channels: conda-forge,defaults | |
| auto-install-conda: true | |
| auto-update-conda: true | |
| mamba-version: "*" | |
| activate-environment: false | |
| # 2. INSTALACIÓN DE HERRAMIENTAS DE DESPLIEGUE | |
| - name: Install anaconda-client and conda-build | |
| shell: bash | |
| run: | | |
| mamba install anaconda-client conda-build -y | |
| # 3. Configurar Autenticación para Anaconda.org | |
| - name: Configure Anaconda Token | |
| shell: bash | |
| run: | | |
| conda run anaconda config --set upload_token ${{ secrets.ANACONDA_TOKEN }} | |
| # 4. CONSTRUIR EL PAQUETE (Depuración añadida) | |
| - name: Conda Build Package (Debugging) | |
| shell: bash | |
| run: | | |
| CONDA_RECIPE_DIR=".github/conda" | |
| echo "Starting conda build for recipe in: $CONDA_RECIPE_DIR" | |
| # Ejecutamos conda build con --debug para ver la causa del error. | |
| # Esto debería aparecer en los logs de GitHub Actions. | |
| conda run conda build $CONDA_RECIPE_DIR --debug | |
| # 5. SUBIR EL PAQUETE (Solo si el paso 4 es exitoso) | |
| - name: Upload Package to Anaconda.org | |
| shell: bash | |
| run: | | |
| CONDA_RECIPE_DIR=".github/conda" | |
| # Obtenemos la ruta del paquete (asumiendo que el build fue exitoso) | |
| PACKAGE_PATH=$(conda run conda build $CONDA_RECIPE_DIR --output) | |
| echo "Uploading $PACKAGE_PATH to ctlearn-project channel..." | |
| # Subimos el archivo con 'conda run anaconda upload' | |
| conda run anaconda upload "$PACKAGE_PATH" --force --user 'ctlearn-project' |