Skip to content

Commit

Permalink
Merge branch 'main' into release/v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dalmijn committed Nov 21, 2023
2 parents 10805ae + f929f42 commit aa8d595
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build and Upload HydroMT-Wflow to PyPI

on:
Expand All @@ -6,7 +7,8 @@ on:
- published
push:
tags:
- 'v*'
- v*
workflow_dispatch:


jobs:
Expand All @@ -20,23 +22,18 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: 3.8
python-version: '3.10'

- name: Install dependencies
- name: generate env
run: |
python -m pip install --upgrade pip
python -m pip install flit wheel twine
pip install tomli flit twine
- name: Build tarball and wheels
- name: Build artifacts
run: |
git clean -xdf
git restore -SW .
flit build
- name: Check built artifacts
run: |
python -m twine check dist/*
pwd
- uses: actions/upload-artifact@v3
with:
Expand All @@ -50,7 +47,8 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: releases
Expand All @@ -60,26 +58,14 @@ jobs:
ls -ltrh
ls -ltrh dist
- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
environment-file: envs/hydromt-wflow-min.yml
activate-environment: hydromt-wflow-min

- name: Conda info
run: |
conda info
conda list
python-version: '3.10'

- name: Verify the built dist/wheel is valid
run: |
python -m pip install dist/hydromt_wflow*.whl
python -c 'from hydromt_wflow import __version__ as v; print(v)'
echo "hydromt --models"
hydromt --models
upload-to-test-pypi:
needs: test-built-dist
Expand Down

0 comments on commit aa8d595

Please sign in to comment.