From 42b06c764c02677c69ceb78f7240619b5016b057 Mon Sep 17 00:00:00 2001 From: chrishavlin Date: Fri, 23 Oct 2026 11:22:01 -0500 Subject: [PATCH 1/2] bump to 0.5.0 --- yt_xarray/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_xarray/__init__.py b/yt_xarray/__init__.py index a2d1e23..68576c3 100644 --- a/yt_xarray/__init__.py +++ b/yt_xarray/__init__.py @@ -2,7 +2,7 @@ __author__ = """Chris Havlin""" __email__ = "chris.havlin@gmail.com" -__version__ = "0.4.2" +__version__ = "0.5.0" # import the xarray accessor so it is registered with xarray From d3501531585ae80a0e812555cdbc41feac596e53 Mon Sep 17 00:00:00 2001 From: chrishavlin Date: Fri, 23 Oct 2026 11:22:54 -0500 Subject: [PATCH 2/2] Fail the release workflow if __version__ does not match the tag --- .github/workflows/publish-to-pypi.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 60efcc2..8db6af5 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -12,6 +12,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 + - name: Check __version__ matches the tag + run: | + ver='${{ github.ref_name }}' + ver="${ver#v}" + pkg_ver=$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' yt_xarray/__init__.py) + if [ "$pkg_ver" != "$ver" ]; then + echo "Tag version $ver does not match yt_xarray.__version__ ($pkg_ver); fix __init__.py before tagging." >&2 + exit 1 + fi + echo "yt_xarray.__version__ == $ver" - name: Extract section for this version run: | ver='${{ github.ref_name }}'