Skip to content

heuristic methods added (#10) #16

heuristic methods added (#10)

heuristic methods added (#10) #16

Workflow file for this run

name: on-release
on:
push:
tags:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
combine-environments:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install conda-merge
run: |
$CONDA/bin/python -m pip install conda-merge
- name: Combine environments
run: |
for SUFFIX in ci integration; do
$CONDA/bin/conda-merge ci/environment-$SUFFIX.yml environment.yml > ci/combined-environment-$SUFFIX.yml || exit
done
- name: Archive combined environments
uses: actions/upload-artifact@v3
with:
name: combined-environments
path: ci/combined-environment-*.yml
docs-build:
needs: [combine-environments]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download combined environments
uses: actions/download-artifact@v3
with:
name: combined-environments
path: ci
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/combined-environment-ci.yml
environment-name: DEVELOP
cache-environment: true
create-args: >-
python=3.10
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Build documentation
run: |
make docs-build
distribution:
runs-on: ubuntu-latest
needs: [combine-environments]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Build distributions
run: |
$CONDA/bin/python -m pip install build
$CONDA/bin/python -m build
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# BOPEN METHOD:
# steps:
# - uses: actions/checkout@v3
# - name: Install packages
# run: |
# $CONDA/bin/python -m pip install build twine
# - name: Build distributions
# run: |
# $CONDA/bin/python -m build
# - name: Check wheels
# run: |
# cd dist || exit
# $CONDA/bin/python -m pip install earthkit_climate*.whl || exit
# $CONDA/bin/python -m twine check * || exit
# $CONDA/bin/python -c "from earthkit import climate"
# - name: Publish a Python distribution to PyPI
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}