Create release tags directly, and GitHub Releases for production only - #4812
Create release tags directly, and GitHub Releases for production only#4812allister-beamable wants to merge 3 commits into
Conversation
The three release workflows created a GitHub Release solely as a way to mint the tag. Those Releases carried no assets and no notes beyond a stub string, nothing in the org read the Releases API, and every downstream consumer keys off the git tag instead: LightBeam's versioned alias and the docs SDK/CLI version table both read tags. Create the tag directly and skip the empty wrapper. Tags are created through the git/refs API rather than git tag + push so they land on exactly github.sha without depending on what the checkout fetched, and so they stay lightweight, matching all 1088 prior tags. Existing Releases are deliberately left alone. This stops making new ones; it does not remove history. Also drops notify-docs-sdk-release.yml. It fired on tag pushes to dispatch the docs table update, but the tag is created with GITHUB_TOKEN and events raised by GITHUB_TOKEN never start a workflow run, so it worked only for tags pushed by hand. release-unity.yml now dispatches beamable/docs explicitly, which is the path proven working, leaving one code path and one consumer of DOCS_DISPATCH_PAT. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
I would go the other way around - instead of removing the creation of the GitHub Releases because they are empty could we consider populating the GitHub Releases with changelogs? |
The main reason I dislike GitHub Releases for us is that we never publish real artifacts there. That is, the thing we are providing, the Beamable Unity SDK and the I will have to think about this; releases automatically get a ZIP and a tarball of the source at the time of release, which is sort of, kind of like an artifact. Your point about releases becoming more valuable when they have changelogs on them is a solid one. |
Per Peter's review comment: a Release is worth having when it carries the changelog. Preview builds are what made the previous 1088 Releases noise - 999 of them were nightly, RC, or experimental. - Tag creation stays unconditional and decoupled, so nightly/RC/exp builds still get their tags; only the Release object is production-gated. - New build/bin/release-notes.sh slices the verbatim "## [VERSION]" section out of each CHANGELOG.md in the lanes the release actually touches, using the same COPY_* lane flags upload-changelogs.sh already takes. Warns rather than fails on a missing section, so a stale changelog cannot red-X a release whose packages have already published. - Paths resolve from GITHUB_WORKSPACE because release-web.yml sets defaults.run.working-directory. Also note release-mcpb.yml uploads .mcpb bundles to the cli-<version> Release; production-gating keeps that path intact, where dropping Releases entirely would have broken it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gh release create silently creates a tag from the default branch when none exists. --verify-tag makes it abort instead, asserting that the preceding tag step actually ran. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Lightbeam link |
|
Idea from @mhijaziB : include a link to the "Getting Started" installation instructions. That way anyone who arrives at Beamable by way of the Releases tab will be guided to the correct next steps. |
Heads-up for anyone who runs releases (@mhijaziB, @Leinnan) - this changes how the release tag gets made in all three release workflows, and changes what GitHub Releases are for.
This PR reversed course mid-review. It started out removing GitHub Releases entirely. @Leinnan pushed back in review: rather than delete them because they are empty, populate them with changelogs. He was right, and two findings during the follow-up made the case stronger than the one he made.
Why
gh release createwas being used purely to mint the tag. Surveying what those Releases actually contained:"<X> Release <version>"That reads as a case for deleting Releases. It is actually a case for fixing them, because of how the 1088 break down:
The noise was the preview builds, not the Release object. A Release per nightly is indefensible under any theory. 89 production Releases carrying real changelogs are a reasonable version history for the Releases tab, which is where a developer evaluating an SDK looks first.
The second finding is the decisive one.
release-mcpb.ymlneeds the Release to exist. It runsgh release upload "cli-<version>"to attach the.mcpbClaude Desktop extension bundles, andcli/cli/Docs/AGENTS.mdalready tells users to download them from GitHub Releases. That workflow has never run, so the "0 with binary assets" row above is true today and false by design. Removing Releases would have broken the.mcpbdistribution path before it ever shipped.Separately, the Release object was actively harmful as a tag-minter: it created the tag under
GITHUB_TOKEN, and events raised byGITHUB_TOKENnever start a workflow run. That is whynotify-docs-sdk-release.ymlnever fired for an automated release - it has run exactly once in its life, for a hand-pushed tag.What changes
Tag creation is decoupled from the Release.
release-unity.yml,release-nuget.yml,release-web.yml:gh release create->gh api .../git/refs, creating the tag at exactlygithub.sha, for every release type. Used the API rather thangit tag+git pushso the tag does not depend on what the checkout fetched (release-unity.ymlchecks outinputs.commit, which need not begithub.sha) and so tags stay lightweight, matching all 1088 existing tags.A GitHub Release is created on top of that tag, for
productiononly. Nightly, RC, and experimental builds get a bare tag and nothing else. Guarded with--verify-tag, becausegh release createsilently creates a tag from the default branch when none exists; the flag makes it abort instead, asserting the preceding tag step ran.New
build/bin/release-notes.shgenerates the notes: a verbatim slice of the## [VERSION]section of eachCHANGELOG.mdin the lanes that release touches, keyed on the sameCOPY_UNITY_SDK/COPY_CLI/COPY_WEB_SDKflagsupload-changelogs.shalready takes, so each workflow declares its lanes identically for both scripts.release-unity.ymlcom.beamable,com.beamable.serverrelease-nuget.ymlBeamable.Tools,Beamable.Serverrelease-web.ymlTwo details worth review attention:
com.beamable.server/CHANGELOG.mdhas been stale since[3.0.0], so the warning fires on the next Unity production release. Worth fixing, but separately.$GITHUB_WORKSPACE, not the working directory, becauserelease-web.ymlsetsdefaults.run.working-directory: web. That is the same trap that givesupload-changelogs.shits../../special case.notify-docs-sdk-release.ymlis deleted.release-unity.ymlalready dispatchesbeamable/docsexplicitly, and that path is proven working end to end (docs run 33002167833). One code path, one consumer ofDOCS_DISPATCH_PAT.The
--prereleaseflag disappears: nothing prerelease gets a Release object any more.What is deliberately NOT changed
Testing
The changelog slicing is tested against real data for all three lanes, including the boundary case that
[6.1.0]must not match a[16.1.0]heading (the match is anchored at column 4). All three workflows parse.The release path itself cannot be verified without cutting a real release - there is no dry-run path that exercises tag or Release creation (
if: inputs.dryRun == false). Step ordering is otherwise unchanged. The first production release after merge is the real test; if either step fails, it fails loudly rather than silently.Follow-ups (not in this PR)
CHANGELOG.mdat its own tag. Tooling is written and dry-run (87 of 89 produce content; two predate their changelog). Not applied - it is 89 public-facing edits.gh release deletewithout--cleanup-tagleaves the tag, and/releases/tag/<tag>,/archive/refs/tags/<tag>.zip, and/tree/<tag>all return 200 for a tag with no Release (346 tags already have none, which is how this was tested directly). Needs throttling for GitHub's secondary rate limit.docsTag.ymltriggers on1.**tags, a scheme no longer cut. Its run history is empty. Dead, flagged not touched.com.beamable.server/CHANGELOG.mdis stale since[3.0.0].release/unity-6.1.xonly if that line cuts another patch - releases execute from release branches, somainalone does not cover an in-flight line.The CS release runbooks and release policy in
JurnalDeBordhave been updated to match; they had documented the original "no GitHub Releases" plan.