I threw together a quick release workflow for another project and I kind of like the way it's decoupled from the test workflow. I think I don't like that it's triggered on GitHub "Release", but we can change it to be triggered from a tag regex easily.
One downside is that the test workflow does a "test docker build" step that would be duplicated in the release workflow. The upside is separation of concerns and readability. We can also eliminate that downside by only running the "test" workflow in PRs, not on pushes to main. I think it's worth it to run the test workflow on pushes to main still, even if there's a touch of duplicated work.
If we do this, we should consider setting up org-level re-usable workflow for the container image release. I've been repeating this config and making small tweaks each time I make a copy, and that's no good.
I threw together a quick release workflow for another project and I kind of like the way it's decoupled from the test workflow. I think I don't like that it's triggered on GitHub "Release", but we can change it to be triggered from a tag regex easily.
https://github.com/nsidc/usaon-vta-survey/blob/main/.github/workflows/release.yml
One downside is that the test workflow does a "test docker build" step that would be duplicated in the release workflow. The upside is separation of concerns and readability. We can also eliminate that downside by only running the "test" workflow in PRs, not on pushes to main. I think it's worth it to run the test workflow on pushes to main still, even if there's a touch of duplicated work.