Skip to content

Commit

Permalink
Build and publish the esmvalcore package to conda via Github Actions …
Browse files Browse the repository at this point in the history
…workflow (#825)
  • Loading branch information
valeriupredoi committed Oct 12, 2020
1 parent 588f5a3 commit ec41530
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/action-conda-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Anaconda Publish

on:
release:
types: [published]
# use this to test before actual release and publish
# push:
# branches:
# - some_test_branch

jobs:

publish:
name: publish / python-3.8 / ubuntu-latest
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- uses: goanpeca/setup-miniconda@v1
with:
auto-update-conda: true
python-version: "3.8"
miniconda-version: "latest"
channels: conda-forge
- name: Show conda config
shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
- name: Python info
shell: bash -l {0}
run: |
which python
python --version
- name: Install build dependencies
shell: bash -l {0}
run: conda install -y conda-build conda-verify ripgrep anaconda-client
- name: Build the conda package
shell: bash -l {0}
run: |
conda config --set anaconda_upload no
export BUILD_FOLDER=/tmp/esmvalcore/_build
mkdir -p $BUILD_FOLDER
conda build package \
--channel esmvalgroup --channel conda-forge \
--croot $BUILD_FOLDER \
- name: Push the package to anaconda cloud
shell: bash -l {0}
run: |
export BUILD_FOLDER=/tmp/esmvalcore/_build
# use --label test before actual release and check all works well
anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --user esmvalgroup $BUILD_FOLDER/noarch/*.tar.bz2
verify:
name: verify / python-${{ matrix.python-version }} / ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest'] # may extent to osx in the future
python-version: ["3.6", "3.7", "3.8"]
runs-on: ${{ matrix.os }}
needs: publish
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: goanpeca/setup-miniconda@v1
with:
python-version: ${{ matrix.python-version }}
miniconda-version: "latest"
channels: esmvalgroup,conda-forge
- shell: bash -l {0}
run: conda --version
- shell: bash -l {0}
run: which conda
- shell: bash -l {0}
run: python -V
- shell: bash -l {0}
run: conda install esmvalcore
- shell: bash -l {0}
run: esmvaltool --help
- shell: bash -l {0}
run: esmvaltool version
2 changes: 2 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Improvements
- Update CMIP6 tables to 6.9.32 (`#706 <https://github.com/ESMValGroup/ESMValCore/pull/706>`__) `Javier Vegas-Regidor <https://github.com/jvegasbsc>`__
- Default config-user path now set in config-user read function (`#791 <https://github.com/ESMValGroup/ESMValCore/pull/791>`__) `Javier Vegas-Regidor <https://github.com/jvegasbsc>`__
- Add custom variable lweGrace (`#692 <https://github.com/ESMValGroup/ESMValCore/pull/692>`__) `bascrezee <https://github.com/bascrezee>`__
- Create Github Actions workflow to build and deploy on Test PyPi and PyPi (`#820 <https://github.com/ESMValGroup/ESMValCore/pull/820>`__) `Valeriu Predoi <https://github.com/valeriupredoi>`__
- Build and publish the esmvalcore package to conda via Github Actions workflow (`#825 <https://github.com/ESMValGroup/ESMValCore/pull/825>`__) `Valeriu Predoi <https://github.com/valeriupredoi>`__

Fixes for datasets
~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit ec41530

Please sign in to comment.