ci(create-release): tag stable releases as both stable and current#37
ci(create-release): tag stable releases as both stable and current#37sherwinski wants to merge 1 commit into
stable and current#37Conversation
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.
|
Ignore - done by accident |
There was a problem hiding this comment.
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.
Summary
Stable releases now declare
Channels: stable, currentin the auto-generated release-notes body — populating both channel slots in thesdk-releasesstatic tracker. Pre-release paths are unaffected (still routed toalpha/beta), with all three values lowercased to match thesdk-releases/README.mdconvention.Motivation
The
sdk-releasesstatic app atOneSignal/sdk-releasesparses each release body forChannels: <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 emitsChannels: Currentfor stable releases, so thestableslot is permanently empty across every consuming SDK repo. Per discussion onOneSignal/API-Client-Libraries, we want stable releases to fill both thestableandcurrentslots — both then track the latest stable release with no per-repo configuration.Change
.github/workflows/create-release.yml:244-249:Behavior by release type:
5.6.0Channels: CurrentChannels: stable, current5.7.0-alpha.0Channels: AlphaChannels: alpha5.7.0-beta.1Channels: BetaChannels: betaCasing change: lowercased all three emitted values. The
sdk-releasesparser is case-insensitive (/giflag plus.toLowerCase()atfetch-releases.js:37,41), and thesdk-releases/README.mddocuments lowercase as the canonical form (Channels: current,**Channels:** beta, alpha). Pure cosmetic alignment — no behavior change for existing releases.Variable rename:
releaseType→channelssince the value can now hold a comma-separated list rather than a single release-type label.Test plan
stableslot retroactively (already done forOneSignal/API-Client-Libraries@5.6.0as part of this rollout).Blast radius
Every SDK repo that consumes
sdk-shared/create-release.yml@mainfor its release-PR auto-population. The change is purely additive on the stable path (stable releases now also tagstablein addition tocurrent); no consumer loses functionality. Pre-release paths are functionally identical (just lowercased).