Add news release actions - #459
Conversation
for more information, see https://pre-commit.ci
|
Does it continue updating a release PR as PR's are merged into main? |
Wire check-news, prepare-release, and a stub Tests workflow against the unmerged actions PR, with seed fragments and CHANGELOG marker.
There was a problem hiding this comment.
Hey @jezdez, I exercised this on https://github.com/conda-sandbox/example. The happy path looks great and will be a big improvement.
One edge case: after the release-notes PR is merged into YY.MM.x but before YY.MM.MICRO is tagged, a later news fragment makes prepare-release fail with Changelog already contains an entry for … (example: https://github.com/conda-sandbox/example/actions/runs/31508633466).
So I think prepare-release should treat an existing changelog heading as still open if that version isn’t tagged yet and amend that section.
I also considered an alternative which would be that PRs to a release branch could change the changelog directly instead, but keeping news fragments feels cleaner.
|
Thanks for exercising this, @danyeaw. |
Retest post-merge changelog amend on a fresh 26.9.x line. Drop removed fragment-format input from check-news.
danyeaw
left a comment
There was a problem hiding this comment.
Thanks @jezdez — re-checked against my feedback. Docs/token/fragment-format/exempt-authors look good, and the changelog amend path matches the post-merge pre-tag case.
Re-validated on conda-sandbox/example with a fresh 26.9.x line pinned to c76832d:
- First release-notes PR: conda-sandbox/example#9
- Post-merge second fragment amend succeeded: https://github.com/conda-sandbox/example/actions/runs/31600748458 → conda-sandbox/example#10
LGTM.
danyeaw
left a comment
There was a problem hiding this comment.
Hi @jezdez, thanks for the updates, these look great. I also tested the post-release merging more news with conda-sandbox/example#9 and conda-sandbox/example#10, it is working great.
Description
Adds conda-owned release-notes actions for the fragment-first news flow:
check-newsvalidates sectioned conda news snippets on pull requests without writing files and honors theno-newslabel.prepare-releaseruns only from a trustedworkflow_runrelease-branch push context, aggregates existing snippets intoCHANGELOG.md, deletes consumed snippets, and opens or updates a release-notes PR.news_commonso PR-time validation and release-time rendering use the same section rules.Refs conda/infrastructure#556 and conda/infrastructure#1378
Related PRs:
Validation:
uv run --with ruff ruff check check-news prepare-release news_commonuv run --with pytest --with pytest-cov --with pytest-mock python -m pytest check-news prepare-releasetemplate-files/test_template_files.py.