From 41989836e7575ca6185d17b6b4c69e414369d44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Tue, 21 Oct 2025 11:42:36 +0200 Subject: [PATCH] added the deploy workflows for conda (#1301) --- .github/workflows/conda_deploy_library.yaml | 47 +++++++++++++++++++++ .github/workflows/conda_deploy_slsdet.yaml | 47 +++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 .github/workflows/conda_deploy_library.yaml create mode 100644 .github/workflows/conda_deploy_slsdet.yaml diff --git a/.github/workflows/conda_deploy_library.yaml b/.github/workflows/conda_deploy_library.yaml new file mode 100644 index 000000000..6b5fb996e --- /dev/null +++ b/.github/workflows/conda_deploy_library.yaml @@ -0,0 +1,47 @@ +name: Build and deploy slsdetlib + +on: + release: + types: + - published + +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 conda-verify pytest anaconda-client + + - name: Enable upload + run: conda config --set anaconda_upload yes + + - name: Build + env: + CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }} + run: conda build conda-recipes/main-library --user slsdetectorgroup --token ${CONDA_TOKEN} --output-folder build_output + + - name: Upload all Conda to github as artifacts + uses: actions/upload-artifact@v4 + with: + name: conda-packages + path: build_output/** # Uploads all packages \ No newline at end of file diff --git a/.github/workflows/conda_deploy_slsdet.yaml b/.github/workflows/conda_deploy_slsdet.yaml new file mode 100644 index 000000000..d25bffa74 --- /dev/null +++ b/.github/workflows/conda_deploy_slsdet.yaml @@ -0,0 +1,47 @@ +name: deploy slsdet + +on: + release: + types: + - published + +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 conda-verify pytest anaconda-client + + - name: Enable upload + run: conda config --set anaconda_upload yes + + - name: Build + env: + CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }} + run: conda build conda-recipes/python-client --user slsdetectorgroup --token ${CONDA_TOKEN} --output-folder build_output + + - name: Upload all Conda packages + uses: actions/upload-artifact@v4 + with: + name: conda-packages + path: build_output/** # Uploads all packages \ No newline at end of file