Skip to content

v24.08.0

v24.08.0 #76

Workflow file for this run

name: Release
on:
release:
types: [published]
workflow_dispatch:
defaults:
run:
shell: bash -l {0} # required for conda env
jobs:
build_conda:
name: Conda build
runs-on: 'ubuntu-22.04'
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # history required so setuptools_scm can determine version
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: build-env
create-args: >-
conda-build
boa
- run: conda mambabuild --channel conda-forge --channel scipp --channel ess-dmsc --no-anaconda-upload --override-channels --output-folder conda/package conda
- uses: actions/upload-artifact@v4
with:
name: conda-package-noarch
path: conda/package/noarch/*.tar.bz2
build_wheels:
name: Wheels
runs-on: 'ubuntu-22.04'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # history required so setuptools_scm can determine version
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/wheels.txt
- name: Build wheels
run: python -m build
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
upload_pypi:
name: Deploy PyPI
needs: [build_wheels, build_conda]
runs-on: 'ubuntu-22.04'
environment: release
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
- uses: pypa/gh-action-pypi-publish@v1.8.14
upload_conda:
name: Deploy Conda
needs: [build_wheels, build_conda]
runs-on: 'ubuntu-22.04'
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: upload-env
# frozen python due to breaking removal of 'imp' in 3.12
create-args: >-
anaconda-client
python=3.11
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-noarch/*.tar.bz2)
docs:
needs: [upload_conda, upload_pypi]
uses: ./.github/workflows/docs.yml
with:
publish: ${{ github.event_name == 'release' && github.event.action == 'published' }}
version: ${{ github.event.release.tag_name }}
secrets: inherit
assets:
name: Upload docs
needs: docs
runs-on: 'ubuntu-22.04'
permissions:
contents: write # This is needed so that the action can upload the asset
steps:
- uses: actions/download-artifact@v4
- name: Zip documentation
run: |
mv docs_html documentation-${{ github.ref_name }}
zip -r documentation-${{ github.ref_name }}.zip documentation-${{ github.ref_name }}
- name: Upload release assets
uses: svenstaro/upload-release-action@v2
with:
file: ./documentation-${{ github.ref_name }}.zip
overwrite: false