From 08b68db1fb76daa8a53aa842660fe60489dba53d Mon Sep 17 00:00:00 2001 From: David Meyer Date: Wed, 26 Feb 2025 22:57:34 -0500 Subject: [PATCH] Fixing release workflow, again. Pin down conda-build<25 to work around internal artifact extention rename from .tar.bz2 to .conda in `setuptools-conda` Adds an anaconda test label for release candidates, which prevents people from auto-installing them via conda. Ensure artifact uploads fail if files are not found. --- .github/workflows/build_release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 37771a8..4a90844 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -48,6 +48,7 @@ jobs: with: name: dist path: ./dist + if-no-files-found: error - name: Set Variables for Conda Build shell: bash @@ -69,7 +70,7 @@ jobs: - name: Conda package (Unix) shell: bash -l {0} run: | - conda install -c labscript-suite setuptools-conda + conda install -c labscript-suite setuptools-conda "conda-build<25" setuptools-conda build $CONDA_BUILD_ARGS . - name: Upload Artifact (conda) @@ -77,6 +78,7 @@ jobs: with: name: conda_packages path: ./conda_packages + if-no-files-found: error github-release: name: Github Release @@ -179,8 +181,20 @@ jobs: shell: bash -l {0} run: conda install anaconda-client + - name: Publish to Test Anaconda channel + shell: bash -l {0} + if: contains(github.event.ref, 'rc') + run: | + anaconda \ + --token ${{ secrets.ANACONDA_API_TOKEN }} \ + upload \ + --user $ANACONDA_USER \ + --label test \ + conda_packages/*/* + - name: Publish to Anaconda channel shell: bash -l {0} + if: contains(github.event.ref, 'rc') != true run: | anaconda \ --token ${{ secrets.ANACONDA_API_TOKEN }} \