Skip to content

Add RC conveniences to release-unity.yml#4661

Open
allister-beamable wants to merge 1 commit into
mainfrom
enhance-release-unity-rc
Open

Add RC conveniences to release-unity.yml#4661
allister-beamable wants to merge 1 commit into
mainfrom
enhance-release-unity-rc

Conversation

@allister-beamable

Copy link
Copy Markdown
Contributor

Folds the useful parts of the (now retired, #4660) combined RC workflow into the real Release Unity SDK workflow — keeping CLI and Unity decoupled, and keeping the npm trusted publisher intact (this is the trusted filename, so public-npm publishing keeps working).

Changes

1. nugetVersion input (the deep-file fix + reuse-prior-CLI)
Optional. When set, jq-writes nugetPackageVersion in versions-default.json at build time — no more hand-editing that deeply-nested file. Blank keeps the SDK's current dependency, i.e. reuse the previous CLI artifact when the CLI has not changed (per Chris). Provide a value only when bundling a freshly cut CLI.

2. Auto RC number
For releaseType: rc, rcNumber: 0 (the default) derives the next RC from existing unity-sdk-<maj.min.patch>-PREVIEW.RC* tags (read via git ls-remote, so a shallow clone is fine). An explicit rcNumber > 0 always wins. Cut RC2..N without tracking the number.

3. Fail-fast changelog guard
For rc/production, the changelog's top ## [x.y.z] entry must match major.minor.patch, checked right after checkout before any build. nightly/exp are unaffected.

Notes

  • Non-rc modes are otherwise unchanged.
  • The orphaned com.beamable@5.1.0-PREVIEW.RC11 on Nexus (from the retired workflow) means auto-RC would compute 11 and collide. Cut the next Unity RC with rcNumber: 12 explicitly until that line moves on.

🤖 Generated with Claude Code

Fold the useful pieces of the retired combined workflow into the real Unity
release, keeping CLI and Unity decoupled and the npm trusted publisher intact:

- nugetVersion input: jq-writes versions-default.json at build time so the
  bundled CLI version no longer needs a hand-edit of the deep file. Blank keeps
  the SDK's current dependency, i.e. reuse the previous CLI artifact when the
  CLI has not changed.
- rcNumber 0 (the default) auto-derives the next RC from existing tags for the
  rc release type; an explicit rcNumber wins.
- Fail-fast changelog guard for rc/production: the changelog top entry must
  match the version line being cut, checked before any build.

Non-rc modes (nightly/exp/production) are unchanged except the shared
changelog guard, which runs only for rc and production.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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