From 613001315401b4df1d1a8dcdfc65c6785adaaeb6 Mon Sep 17 00:00:00 2001 From: ssun30 Date: Fri, 22 Nov 2024 15:12:04 -0500 Subject: [PATCH] Removed configure auto-upload from workflow This step is removed because the conda-build command already specifies which channel the package is uploaded to, thus making the anaconda_upload variable redundant Also added conda-verify to verify the package --- .github/workflows/conda_build.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/conda_build.yml b/.github/workflows/conda_build.yml index 436c6e48c8..073a61d001 100644 --- a/.github/workflows/conda_build.yml +++ b/.github/workflows/conda_build.yml @@ -34,12 +34,7 @@ jobs: activate-environment: "" - name: Install Build Tools - run: mamba install python anaconda-client conda-build - - - name: Configure Auto-Upload - if: github.ref == 'refs/heads/stable' - run: | - mamba config --set anaconda_upload yes + run: mamba install python anaconda-client conda-build conda-verify - name: Build Binary run: | @@ -51,8 +46,10 @@ jobs: fi echo "CONDA_TOKEN=$CONDA_TOKEN" >> $GITHUB_ENV - - # Build the Conda binary - conda-build --token "$CONDA_TOKEN" --user rmg .conda - - + + # Conditionally add the --token and --user flags for stable branches + if [[ "${GITHUB_REF}" == "refs/heads/stable" ]]; then + conda-build --token "$CONDA_TOKEN" --user rmg .conda + else + conda-build .conda + fi