Skip to content

feat(github-action): filter GitHub releases by package - #370

Merged
goulvenclech merged 1 commit into
bruits:mainfrom
arthurfiorette:feat/main-package-github-release
Nov 29, 2026
Merged

goulvenclech merged 1 commit into
bruits:mainfrom
arthurfiorette:feat/main-package-github-release

Conversation

@arthurfiorette

@arthurfiorette arthurfiorette commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

With create-github-release: true, the action creates a GitHub release for every tag sampo publish creates. That suits a monorepo of independent packages, but not one that ships a single product built from many internal packages.

devlanes is a Cargo workspace of 62 crates with per-crate changelogs in a linked group. Its 0.4.0 release bumped 52 of them, so with releases on, one merge of the release PR would create 52 GitHub releases. Its users want one release for devlanes, and the changes recorded on internal crates still belong in its notes. Writing every changeset against the main package would get them there, but then the crate changelogs would no longer say what changed in each crate.

Part of three PRs from the same setup: #371 stops tagging unpublished packages, and #369 lists each changeset once in the release PR and bot comment. None depends on the others: #371 decides which tags exist, this PR which of them get a GitHub release.

What has changed?

  • create-github-release also accepts a comma-separated list of package names, parsed and matched like open-discussion through a shared PackageFilter. true, false, 1 and 0 behave as before.
  • With a list, only tags of listed packages get a GitHub release.
  • The release of the first listed package also gets an ## Other packages section with every other tag from the same publish: a ### name version heading and its changelog section for packages with real entries, then the collapsed list from the release PR body (feat(core/github-action): add changelog.automatic_entries option #341) for packages that were only bumped. Other listed packages get only their own notes, so nothing appears twice.
  • If no listed package has a new tag, no release is created and the action logs why. Tags are pushed as today.
  • open-discussion still filters among the releases that are created.
  • Past GitHub's 125,000-character limit, the remaining packages are left out with a note pointing to their changelogs.
  • sampo-core gets is_automatic_changelog_section, so the action can tell bump-only sections apart in both automatic_entries modes without copying their strings.

With create-github-release: devlanes, a release would look like this (entries made up for illustration):

### Minor changes

- Added `devlanes up --detach`.

## Other packages

### devlanes-daemon 0.4.0

#### Patch changes

- Fixed lanes left running after the daemon restarts.

<details>
<summary>50 packages bumped only to follow other packages</summary>

- devlanes-core 0.4.0
- devlanes-git 0.4.0
- ...

</details>

How is it tested?

  • Unit tests: input parsing (true, 1, false, 0, empty, stray commas, whitespace), which tags get releases and where the other notes go, discussions among created releases, the exact combined body with a package with entries, a bump-only package in each automatic_entries mode and one without a changelog, truncation, and heading demotion skipping code blocks.
  • Integration tests: a publish dry run with a list plans one release that folds in two other tags, and a run with no listed tag plans none.
  • sampo-core: is_automatic_changelog_section on automatic and mixed sections.

fmt and both clippy variants pass, as do the unit tests. On Windows, two integration tests (test_default_command_is_auto and test_auto_mode_without_changesets_attempts_publish) also fail on main, and the rest need the binary copied without .exe. I couldn't create a real release, so the API calls with a combined body are untested.

How is it documented?

create-github-release is described in the action README, with an example, and in action.yml. Changeset included, minor for sampo-core and sampo-github-action.

@sampo-s-bot

sampo-s-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

🧭 Changeset detected

Merging this PR will release the following updates:

sampo-github-action (Cargo) — minor version bump

Minor changes

  • Added a package list to the GitHub Action's create-github-release input, to create GitHub Releases for those packages only.

@github-actions github-actions Bot added documentation Improvements or additions to documentation crt:sampo-github-action Changes in Sampo's Github action crate. crt:sampo-core Changes in Sampo core logic or internal utils. labels Oct 26, 2026

@goulvenclech goulvenclech 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 @arthurfiorette for the proposition! But I'm not convinced by gathering the other packages' notes. It relies on a positional convention, adds a function to core for presentation only, and conflicts with #371, which can skip the tags it builds on. Would the package filter alone cover what devlanes needs?

@goulvenclech
goulvenclech force-pushed the feat/main-package-github-release branch from b0ad488 to 262382b Compare November 29, 2026 10:41
@github-actions github-actions Bot removed the crt:sampo-core Changes in Sampo core logic or internal utils. label Nov 29, 2026
@goulvenclech goulvenclech changed the title feat(core/github-action): create GitHub releases for listed packages only feat(github-action): filter GitHub releases by package Nov 29, 2026
@goulvenclech

Copy link
Copy Markdown
Member

Thanks @arthurfiorette ! I took the liberty of trimming it down to the package filter, rebased on main, and added a test.

@goulvenclech
goulvenclech merged commit 9c6ae33 into bruits:main Nov 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crt:sampo-github-action Changes in Sampo's Github action crate. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants