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