From cd5a7386962b0f7c067fa94b534f7880fb95cd2b Mon Sep 17 00:00:00 2001 From: froejdh_e Date: Wed, 5 Feb 2025 15:44:45 +0100 Subject: [PATCH] disable upload on dev --- ...{deploy.yml => build_and_deploy_conda.yml} | 8 ---- .github/workflows/build_conda.yml | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 8 deletions(-) rename .github/workflows/{deploy.yml => build_and_deploy_conda.yml} (87%) create mode 100644 .github/workflows/build_conda.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/build_and_deploy_conda.yml similarity index 87% rename from .github/workflows/deploy.yml rename to .github/workflows/build_and_deploy_conda.yml index cef2a6c..90e75c1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/build_and_deploy_conda.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - developer jobs: build: @@ -33,16 +32,9 @@ jobs: - name: Prepare run: conda install conda-build=24.9 conda-verify pytest anaconda-client - - - name: Disable upload - run: conda config --set anaconda_upload no - - name: Enable upload - if: github.ref == 'refs/heads/main' run: conda config --set anaconda_upload yes - - - name: Build env: CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }} diff --git a/.github/workflows/build_conda.yml b/.github/workflows/build_conda.yml new file mode 100644 index 0000000..6d67b87 --- /dev/null +++ b/.github/workflows/build_conda.yml @@ -0,0 +1,43 @@ +name: Build pkgs and deploy if on main + +on: + push: + branches: + - main + - developer + +jobs: + build: + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, ] # macos-12, windows-2019] + python-version: ["3.12",] + + runs-on: ${{ matrix.platform }} + + # The setup-miniconda action needs this to activate miniconda + defaults: + run: + shell: "bash -l {0}" + + steps: + - uses: actions/checkout@v4 + + - name: Get conda + uses: conda-incubator/setup-miniconda@v3.0.4 + with: + python-version: ${{ matrix.python-version }} + channels: conda-forge + + - name: Prepare + run: conda install conda-build=24.9 conda-verify pytest anaconda-client + + - name: Disable upload + run: conda config --set anaconda_upload no + + - name: Build + env: + CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }} + run: conda build conda-recipe +