Skip to content

feat(release): add shared release tooling - #415

Open
wpbonelli wants to merge 14 commits into
MODFLOW-ORG:developfrom
wpbonelli:feat/release-actions
Open

wpbonelli wants to merge 14 commits into
MODFLOW-ORG:developfrom
wpbonelli:feat/release-actions

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Shared CI/release tooling for program repos

  • actions
    • setup: Intel compilers via setup-fortran, gfortran from the repo's pixi environment (conda-forge), static linking via LDFLAGS (including libstdc++ on Linux), MACOSX_DEPLOYMENT_TARGET=14.0
    • check-linkage: fail unless binaries dynamically link only system libraries (compiler runtimes static), glibc ≤ 2.34 on Linux, arm64 and macOS ≥ 14.0 on macOS
    • package: zip bin/ as <ostag>.zip and the source as <name>_source.zip, identically on every platform
    • release-start: check the version is newer than the latest tag and has no zero padding (and, for dual branching repos i.e. develop and main/master, that the last release is merged back to develop)
    • release-finish: publish with optional extra-assets, from the repo or dist-* artifacts
  • Python modules (standard library only) defining shared release logic
    • version
    • changelog
    • package
    • linkage
    • workflow
    • config
  • release.toml in each program repo for the program's name and long name, and any extra files holding the version
  • example build and release workflows in docs/examples/ for program repos to copy
  • shared git-cliff template cliff.toml
  • single (main/master) and dual (develop -> main/master) branching models
  • monthly dependabot jobs

The idea is for each program repo to own its workflows, since they may vary too much to share, but define shared scripts/actions/conventions here. Moving some logic into Python should help if God forbid we are ever forced off GitHub to another git forge/CICD platform.

Composite actions, scripts and example workflows for building, packaging and releasing MODFLOW program repositories, generalized from mfusg's workflows. Moved from MODFLOW-ORG/release-tooling, so the actions are versioned with modflow-devtools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wpbonelli wpbonelli added this to the 1.10.0 milestone Nov 11, 2026
@wpbonelli wpbonelli added the enhancement New feature or request label Nov 11, 2026
@wpbonelli wpbonelli changed the title feat(release): add release actions for program repositories feat(release): add shared release tooling Nov 11, 2026
wpbonelli and others added 12 commits November 11, 2026 06:12
actionlint 1.7.7 rejects YAML aliases for on.<event>.paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the release-start/finish logic into modflow_devtools/release/workflow.py
so it can be tested, and make each stage safe to rerun. Fail before the build
when a release has no changelog section. Support extra release assets, drop
Intel macOS, take gfortran from pixi and always link compiler runtimes
statically, enforce static linkage on every platform, package the same way
everywhere, use only the shared git-cliff template at a pinned version, scope
the meson version to project(), and update version files atomically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows, --prepend repeated the changelog header. Insert the new section
above the earlier ones in Python, and write the file with LF line endings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the linkage check from bash in check-linkage into
modflow_devtools/release/linkage.py, with parsers tested on sample tool
output. Binaries may link only libraries the OS provides (allowlists per
OS, replacing the compiler runtime denylist, so libstdc++ on Linux now
fails), must need glibc 2.34 or older on Linux, and must be arm64 with a
minimum macOS of 14.0 on macOS. Binaries are found by file format,
recursively, and the check fails if it finds none or a tool fails.

The setup action sets MACOSX_DEPLOYMENT_TARGET=14.0 on macOS and drops
the discontinued intel-classic compiler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On dispatch, release-start now fails if the version isn't newer than
the highest release tag on origin (vX.Y.Z, or X.Y.Z from before the
convention), and in the dual-branch model if that tag isn't reachable
from the development branch, as happens when the post-release pull
request is squash-merged, which would make the changelog repeat it.

Extra asset globs are also matched against the downloaded dist-*
artifacts, so files built in other jobs can be attached by uploading
them as dist-* artifacts, instead of being rejected as unexpected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elogs

The shared git-cliff template now recognizes X.Y.Z tags as well as
vX.Y.Z, since some programs' older releases were tagged without the v,
and links the pull request for commits ending in (#N), as squash merges
do, instead of the commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing uses the changelog action, since release-start and
release-finish update CHANGELOG.md and read the notes themselves.
Remove the release-start no-op CI job too, which the workflow module's
tests cover. Bump actions/setup-python to v7, and say in the docs that
the actions are written for Fortran programs, and what C++ programs
need to do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workflow module's pull request and release calls now go through a
GitHub class, so the rest of the module only uses git, and another forge
would need only another class with the same methods. Errors and notices
go through the ci module, as workflow commands in GitHub Actions and
plain text elsewhere.

Add a test that each release module runs with only the standard
library, since the actions run them without installing anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Explain why a GitHub App token is better than the workflow token for
the release pull requests, and that release versions are plain
integers, so zero padding is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Link libgcc statically for Intel on Linux too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…of CI

Intel's static Windows runtime links imagehlp.dll, a system DLL, for
tracebacks. The no-binaries test read stderr, but in Actions errors are
annotations on stdout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…programs

The program's name and long name come from release.toml instead of
action inputs. Remove release-finish's platforms input, since every
release has the same archives, and the version action, which the
example workflows don't use.

setup links libstdc++ statically on Linux, and checks for gfortran only
for Fortran programs. release-start rejects zero-padded versions, and
warns when a release's changelog section is empty. A test checks that
setup's minimum macOS matches the linkage check's.

The docs explain the path input, two-part tags and ubuntu-22.04's glibc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release notes are generated from commits into CHANGELOG.md by default. A
program whose notes are written by hand names the file holding them, with
the same "## Version X.Y.Z" sections, as release-notes.path in
release.toml. Then git-cliff doesn't run, and the version's section of
that file becomes the release's description.

Either way, release-notes.asset can name a document built from the notes,
e.g. ReleaseNotes.pdf. release-finish refuses to publish unless it is
attached, and the description links to it. The example build workflow has
a commented job building it with pandoc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant