Skip to content

Add news release actions - #459

Merged
danyeaw merged 8 commits into
mainfrom
feature/news-release-actions
Aug 12, 2026
Merged

Add news release actions#459
danyeaw merged 8 commits into
mainfrom
feature/news-release-actions

Conversation

@jezdez

@jezdez jezdez commented Jun 5, 2026

Copy link
Copy Markdown
Member

Description

Adds conda-owned release-notes actions for the fragment-first news flow:

  • check-news validates sectioned conda news snippets on pull requests without writing files and honors the no-news label.
  • prepare-release runs only from a trusted workflow_run release-branch push context, aggregates existing snippets into CHANGELOG.md, deletes consumed snippets, and opens or updates a release-notes PR.
  • Shared parsing lives in news_common so 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_common
  • uv run --with pytest --with pytest-cov --with pytest-mock python -m pytest check-news prepare-release
  • Full suite currently has 111 passing tests and 2 unrelated existing Rich ANSI assertion failures in template-files/test_template_files.py.

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jun 5, 2026
@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review Jun 5, 2026
@dholth

dholth commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Does it continue updating a release PR as PR's are merged into main?

Comment thread prepare-release/README.md
@jezdez
jezdez marked this pull request as ready for review August 10, 2026 11:45
@jezdez
jezdez requested a review from a team as a code owner August 10, 2026 11:45
@jezdez jezdez self-assigned this Aug 10, 2026
@jezdez jezdez moved this from 🆕 New to 👀 In Review in 🔎 Review Aug 10, 2026
danyeaw added a commit to conda-sandbox/example that referenced this pull request Aug 10, 2026
Wire check-news, prepare-release, and a stub Tests workflow against
the unmerged actions PR, with seed fragments and CHANGELOG marker.

@danyeaw danyeaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread prepare-release/README.md Outdated
Comment thread check-news/action.yml Outdated
Comment thread check-news/README.md
@jezdez

jezdez commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

Thanks for exercising this, @danyeaw. prepare-release now updates the existing changelog section while the inferred version remains untagged, preserving the original heading and surrounding changelog content. I also updated the token example, removed fragment-format, and documented the exempt-authors replacement behavior.

@jezdez
jezdez requested a review from danyeaw August 12, 2026 10:43
danyeaw added a commit to conda-sandbox/example that referenced this pull request Aug 12, 2026
Retest post-merge changelog amend on a fresh 26.9.x line.
Drop removed fragment-format input from check-news.

@danyeaw danyeaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

LGTM.

@github-project-automation github-project-automation Bot moved this from 👀 In Review to ✅ Approved in 🔎 Review Aug 12, 2026

@danyeaw danyeaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@danyeaw
danyeaw merged commit c1c846f into main Aug 12, 2026
7 checks passed
@danyeaw
danyeaw deleted the feature/news-release-actions branch August 12, 2026 13:23
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Automate release changelog generation from news fragments

5 participants