From d860971ad8d36c9913074d879487dc42e2facd50 Mon Sep 17 00:00:00 2001 From: Thomas-Otavio Peulen Date: Tue, 13 Feb 2024 17:20:02 +0100 Subject: [PATCH] Upload on release --- .github/workflows/conda-build.yml | 10 ++++- .github/workflows/conda-release.yml | 64 ----------------------------- 2 files changed, 9 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/conda-release.yml diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 94b5aa55..60e7c39c 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -5,6 +5,8 @@ on: push: branches: - development + release: + types: ['released', 'prereleased'] schedule: # Every Monday at 11PM UTC - cron: "0 11 * * 1" @@ -55,4 +57,10 @@ jobs: # curl -sLO https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/084b098a28a7a66e9a0967d156bc55b9ebfc6726/recipe/conda_build_config.yaml # curl -sLO https://github.com/conda-forge/conda-forge-pinning-feedstock/raw/main/recipe/conda_build_config.yaml conda mambabuild . - + + - name: Upload Conda Package + if: github.event_name == 'release' && github.event.action == 'created' + with: + shell: bash -el {0} + run: | + anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u tpeulen --force conda-bld/**/*.tar.bz2 diff --git a/.github/workflows/conda-release.yml b/.github/workflows/conda-release.yml deleted file mode 100644 index 6cbcd099..00000000 --- a/.github/workflows/conda-release.yml +++ /dev/null @@ -1,64 +0,0 @@ - -name: Build and Upload Conda Packages - -on: - workflow_dispatch: -# push: -# branches: -# - develop - release: - types: ['released', 'prereleased'] - -jobs: - build: - name: CondaBuild (${{ matrix.python-version }}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.10"] - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: "Set SDK on MacOS (if needed)" - if: startsWith(matrix.os, 'macos') - run: build_tools/install_macos_sdk.sh - - - name: Set up Conda - uses: conda-incubator/setup-miniconda@v3 - with: - auto-update-conda: true - python-version: ${{ matrix.python-version }} - mamba-version: "*" - channels: conda-forge,defaults - channel-priority: true - - - name: Display Conda Settings - shell: bash -el {0} - run: | - conda info - conda list - conda config --show-sources - conda config --show - printenv | sort - - - name: Build Conda Package - uses: aganders3/headless-gui@v1 - with: - shell: bash -el {0} - run: | - mamba install conda-build boa anaconda-client - conda config --add channels tpeulen - cd conda-recipe - # Use older conda_build_config -> boost-cpp 1.78 - # curl -sLO https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/084b098a28a7a66e9a0967d156bc55b9ebfc6726/recipe/conda_build_config.yaml - # curl -sLO https://github.com/conda-forge/conda-forge-pinning-feedstock/raw/main/recipe/conda_build_config.yaml - conda mambabuild . --output-folder ../conda-bld - - - name: Upload Conda Package - shell: bash -el {0} - run: | - anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u tpeulen --force conda-bld/**/*.tar.bz2 -