Version 1.2.7 #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflows will upload a Python Package using Twine when a release is created | |
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | |
name: Publish Python Package | |
on: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Create working directories | |
run: | | |
mkdir -p libs-hdf5 libs-netcdf | |
- name: Cache HDF5 | |
id: cache-hdf5 | |
uses: actions/cache@v2 | |
with: | |
path: libs-hdf5 | |
key: ${{ runner.os }}-hdf5-v3 | |
- name: Build HDF5 | |
if: steps.cache-hdf5.outputs.cache-hit != 'true' | |
run: | | |
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.gz | |
tar -xf hdf5-1.12.0.tar.gz | |
cd hdf5-1.12.0 && ./configure --prefix=/usr/local && make | |
working-directory: libs-hdf5 | |
- name: Install HDF5 | |
run: | | |
cd hdf5-1.12.0 && sudo make install | |
working-directory: libs-hdf5 | |
- name: Cache NetCDF | |
id: cache-netcdf | |
uses: actions/cache@v2 | |
with: | |
path: libs-netcdf | |
key: ${{ runner.os }}-netcdf-v2 | |
- name: Build NetCDF | |
if: steps.cache-netcdf.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.7.4.tar.gz -O netcdf-c-4.7.4.tar.gz | |
tar -xf netcdf-c-4.7.4.tar.gz | |
cd netcdf-c-4.7.4 && ./configure --prefix=/usr/local --disable-dap && make | |
working-directory: libs-netcdf | |
- name: Install NetCDF | |
run: | | |
cd netcdf-c-4.7.4 && sudo make install | |
working-directory: libs-netcdf | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry | |
poetry env use system | |
poetry install | |
- name: Build and publish | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
poetry publish --build |