Skip to content

Merge remote-tracking branch 'origin/qa' into next #4

Merge remote-tracking branch 'origin/qa' into next

Merge remote-tracking branch 'origin/qa' into next #4

Workflow file for this run

name: Conda Packaging and Deployment
on:
workflow_dispatch:
push:
branches: [qa, main]
tags: ['v*']
jobs:
linux:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
channels: mantid/label/main,conda-forge,defaults
python-version: '3.10'
miniconda-version: latest
mamba-version: "*"
environment-file: environment.yml
- name: Build Wheel
run: |
python -m build --wheel --no-isolation
check-wheel-contents dist/quicknxs-*.whl
- name: Build Conda package
run: |
cd conda.recipe
VERSION=$(versioningit ../) conda mambabuild --output-folder . . -c mantid
conda verify noarch/quicknxs-*.tar.bz2
- name: Deploy to Anaconda
if: startsWith(github.ref, 'refs/tags/v')
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
IS_RC: ${{ contains(github.ref, 'rc') }}
IS_DEV: ${{ github.ref == 'refs/heads/next' }}
run: |
# label is main or rc depending on the tag-name
CONDA_LABEL="main"
if [ "${IS_RC}" = "true" ]; then CONDA_LABEL="rc"; fi
if [ "${IS_DEV}" = "true" ]; then CONDA_LABEL="dev"; fi
echo pushing ${{ github.ref }} with label $CONDA_LABEL
anaconda upload --label $CONDA_LABEL conda.recipe/noarch/quicknxs-*.tar.bz2