Skip to content

ci(create-release): tag stable releases as both stable and current#37

Closed
sherwinski wants to merge 1 commit into
mainfrom
ci/stable-current-channel-tagging
Closed

ci(create-release): tag stable releases as both stable and current#37
sherwinski wants to merge 1 commit into
mainfrom
ci/stable-current-channel-tagging

Conversation

@sherwinski
Copy link
Copy Markdown
Contributor

Summary

Stable releases now declare Channels: stable, current in the auto-generated release-notes body — populating both channel slots in the sdk-releases static tracker. Pre-release paths are unaffected (still routed to alpha / beta), with all three values lowercased to match the sdk-releases/README.md convention.

Motivation

The sdk-releases static app at OneSignal/sdk-releases parses each release body for Channels: <names> lines and fills four channel slots (stable, current, beta, alpha) on a first-come-wins basis as it walks releases newest-first (scripts/fetch-releases.js:127-141). Today this workflow only emits Channels: Current for stable releases, so the stable slot is permanently empty across every consuming SDK repo. Per discussion on OneSignal/API-Client-Libraries, we want stable releases to fill both the stable and current slots — both then track the latest stable release with no per-repo configuration.

Change

.github/workflows/create-release.yml:244-249:

-            // Determine release type from version
-            const version = '${{ steps.release_version.outputs.version_to }}';
-            const releaseType = version.includes('-alpha') ? 'Alpha' :
-                               version.includes('-beta') ? 'Beta' : 'Current';
-
-            let releaseNotes = `Channels: ${releaseType}\n\n`;
+            // Determine which channels this release populates in the
+            // `sdk-releases` static app (`scripts/fetch-releases.js`).
+            // Stable releases fill both `stable` and `current` slots —
+            // the app walks releases newest-first and first-come-wins
+            // per slot, so this keeps both slots tracking the latest
+            // stable release without any per-repo branching logic.
+            // Pre-release suffixes still route to their own channel.
+            const version = '${{ steps.release_version.outputs.version_to }}';
+            const channels = version.includes('-alpha') ? 'alpha' :
+                             version.includes('-beta') ? 'beta' : 'stable, current';
+
+            let releaseNotes = `Channels: ${channels}\n\n`;

Behavior by release type:

Release shape Before After
5.6.0 Channels: Current Channels: stable, current
5.7.0-alpha.0 Channels: Alpha Channels: alpha
5.7.0-beta.1 Channels: Beta Channels: beta

Casing change: lowercased all three emitted values. The sdk-releases parser is case-insensitive (/gi flag plus .toLowerCase() at fetch-releases.js:37,41), and the sdk-releases/README.md documents lowercase as the canonical form (Channels: current, **Channels:** beta, alpha). Pure cosmetic alignment — no behavior change for existing releases.

Variable rename: releaseTypechannels since the value can now hold a comma-separated list rather than a single release-type label.

Test plan

  • CI on this PR exercises the workflow's YAML and JavaScript syntax.
  • Backfill: the next stable release across consuming repos (api-client-libraries, web-SDK, native SDKs) will pick up the new line automatically once this merges.
  • Existing release bodies in consuming repos can be hand-edited to backfill the stable slot retroactively (already done for OneSignal/API-Client-Libraries@5.6.0 as part of this rollout).

Blast radius

Every SDK repo that consumes sdk-shared/create-release.yml@main for its release-PR auto-population. The change is purely additive on the stable path (stable releases now also tag stable in addition to current); no consumer loses functionality. Pre-release paths are functionally identical (just lowercased).

The `sdk-releases` static app (`scripts/fetch-releases.js`) walks
GitHub releases newest-first and assigns each release to channel
slots on a first-come-wins basis. Today this workflow emits
`Channels: Current` for every stable release, so the `stable` slot
in the static app is permanently empty across consuming SDK repos.

Switch the stable-release path to emit `Channels: stable, current`.
Both slots now track the latest stable release without any per-repo
configuration. Pre-release paths keep their dedicated channels
(`alpha` / `beta`), but lowercased so all three emissions match the
documented convention in `sdk-releases/README.md`. The parser is
case-insensitive (`/gi` flag plus `.toLowerCase()` in
`fetch-releases.js:37,41`), so the casing change is purely
cosmetic — no behavior change for existing releases.

`releaseType` renamed to `channels` since the value can now hold a
comma-separated list of channel tags, not a single release type.
@sherwinski sherwinski requested a review from a team as a code owner May 20, 2026 22:49
@sherwinski
Copy link
Copy Markdown
Contributor Author

Ignore - done by accident

@sherwinski sherwinski closed this May 20, 2026
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

LGTM — small, well-explained CI tweak to release-notes channel tags.

Extended reasoning...

Overview

This PR modifies a single GitHub Actions workflow (.github/workflows/create-release.yml) to change the Channels: line emitted into auto-generated release-notes bodies. Stable releases now emit Channels: stable, current instead of Channels: Current, and all three channel values are lowercased to match the sdk-releases parser's documented convention. Pre-release routing is functionally unchanged (only casing differs).

Security risks

None. The change touches only a literal string interpolated into a release-notes body — no new inputs, no new permissions, no shell expansions, no token usage. The version value still flows through the same steps.release_version.outputs.version_to channel as before.

Level of scrutiny

Low. This is a release-metadata string change inside a CI workflow. The diff is ~10 lines, the logic is a straight ternary on version.includes(...), and the PR description spells out the downstream parser behavior (case-insensitive, first-come-wins per slot) that justifies the change. Behavior is additive on the stable path and cosmetic on the pre-release paths.

Other factors

The PR description includes a clear before/after table, links to the consumer-side parser code, and notes a manual backfill already performed on API-Client-Libraries@5.6.0. No outstanding reviewer comments, no bugs flagged by the hunter, no prior reviews from me to reconcile against. Comfortable approving without human gate.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant