diff --git a/.github/workflows/multi-platform-build.yml b/.github/workflows/multi-platform-build.yml index 7b703c7..8209174 100644 --- a/.github/workflows/multi-platform-build.yml +++ b/.github/workflows/multi-platform-build.yml @@ -123,12 +123,12 @@ jobs: retention-days: 30 - name: Login to Anaconda with API token - if: steps.should_build.outputs.should_build == 'true' && (github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')) + if: steps.should_build.outputs.should_build == 'true' && (github.event.inputs.upload_to_anaconda == 'true') run: | - anaconda login --token ${{ secrets.ANACONDA_API_TOKEN }} + anaconda login -t ${{ secrets.ANACONDA_API_TOKEN }} - name: Upload to Anaconda.org (unilab organization) - if: steps.should_build.outputs.should_build == 'true' && (github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')) + if: steps.should_build.outputs.should_build == 'true' && (github.event.inputs.upload_to_anaconda == 'true') run: | for package in $(find ./output -name "*.conda"); do echo "Uploading $package to unilab organization..." @@ -136,6 +136,6 @@ jobs: done - name: Logout from Anaconda - if: always() && steps.should_build.outputs.should_build == 'true' && (github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')) + if: always() && steps.should_build.outputs.should_build == 'true' && (github.event.inputs.upload_to_anaconda == 'true') run: | anaconda logout || true diff --git a/.github/workflows/unilabos-conda-build.yml b/.github/workflows/unilabos-conda-build.yml index 9b5fbfb..cbd690a 100644 --- a/.github/workflows/unilabos-conda-build.yml +++ b/.github/workflows/unilabos-conda-build.yml @@ -76,12 +76,12 @@ jobs: retention-days: 30 - name: Login to Anaconda with API token - if: github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') + if: github.event.inputs.upload_to_anaconda == 'true' run: | - anaconda login --token ${{ secrets.ANACONDA_API_TOKEN }} + anaconda login -t ${{ secrets.ANACONDA_API_TOKEN }} - name: Upload to Anaconda.org (uni-lab organization) - if: github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') + if: github.event.inputs.upload_to_anaconda == 'true' run: | for package in $(find ./output -name "*.conda"); do echo "Uploading $package to uni-lab organization..." @@ -89,6 +89,6 @@ jobs: done - name: Logout from Anaconda - if: always() && (github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')) + if: always() && (github.event.inputs.upload_to_anaconda == 'true' run: | anaconda logout || true