Repository navigation
Samples: version and release the content templates separately from the engine - #3442
Merged
Merged
Conversation
Contributor
|
🤖 Draft PR — automatic CI is skipped to save runner minutes.
|
4 tasks done
xen2
marked this pull request as ready for review
September 16, 2026 17:12
xen2
force-pushed
the
feature/samples-content-versioning
branch
3 times, most recently
from
September 17, 2026 08:46
8f27102 to
1e779df
Compare
Member
|
@xen2 I pushed a commit to fix the Launcher build. |
Kryptos-FR
reviewed
Sep 17, 2026
Kryptos-FR
reviewed
Sep 17, 2026
Kryptos-FR
reviewed
Sep 17, 2026
Kryptos-FR
reviewed
Sep 17, 2026
xen2
force-pushed
the
feature/samples-content-versioning
branch
from
September 18, 2026 00:20
9419351 to
5d18a1e
Compare
xen2
force-pushed
the
feature/samples-content-versioning
branch
from
September 18, 2026 03:22
5d18a1e to
e35953e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The content templates (
Stride.Templates.Samples,.Games.Starters,.AssetPacks) hold samples that rarely change, and they are big:For comparison, the engine-versioned
Stride.Templates.Gamesis 2 MB packed. Until now the content packs were hard to control:SamplesVersionplus the engine's prerelease suffix, so every engine beta asked for a new content version. A 4.5 beta engine asked for4.4.0-betaNcontent: old content from the 4.4 cycle, or nothing.-devNcopy of the whole content on every build, and every engine release packed them again.-SkipDuplicate. That only works if the samples did not change. If they did, nuget.org silently kept the old packages and nobody noticed.What changes
StrideVersion.SamplesVersionis the exact published version the engine uses, with no suffix added. Game Studio pins it ([x.y.z]), and the Game Studio bridge and thestrideCLI share one resolver for it. The same content is reused by any number of engine releases. Every lookup is exact: no "this version or higher" when resolving or downloading, and the CLI also uses the exactStride.Templates.Gamesits engine depends on.StridePackContentTemplatestotrueinbuild/Stride.Local.props(new files have the line commented out; add it to an existing one), or pass-p:StridePackContentTemplates=truefor a one-off build. The pack is always-devN(4.4.0-beta7-dev2) and is preferred locally; the next build with the flag off removes it. A dev build copies only that dev pack from local feeds into the NuGet cache, so a local file carrying a published version no longer replaces the published package (the build warns about such files). CI builds pack them by default, so CI still tests the samples of the branch and does not need the content to be published.release-samples.ymlpacks them under the next content version, tests, signs and publishes them, tagssamples/<version>, and only then commitsSamplesVersionto the branch. Nothing is committed on a dry run.PrepareSamplesForRelease(inbuild/Stride.Samples.build) runs the upgraders over the samples and packs them locally, for when the engine changed under them. The steps are indocs/build/versioning.md.release-samples.ymlrefuses a version that is not after the committed one, is already released, is not on the branch's engine line (4.4.x content is released from the 4.4 branch only), or is prerelease for a stable engine. An emptyversiontakes the next number, or<line>.0when the branch still names older-line content.SharedAssemblyInfo.Generated.cswas regenerated only when the engine version changed, so a changedSamplesVersionnever reached the build. It now regenerates on any change toSharedAssemblyInfo.cs.stride newreports a failed project upgrade instead of exiting with success.strideCLI's template profile added the same packages again on every run and kept old versions installed next to the current ones. It now installs from the extracted package and keeps only the packages resolved for the run.SamplesVersionis4.4.0-beta7on this branch: the content already published with that engine, and the samples are unchanged since. Dev builds keep working right after the merge.After merge
master. GitHub only offers to run a workflow once it is on the default branch.release-samples.ymlonmaster-4.4withdeployon, an emptyversion(it takes4.4.0), and theversion-suffixof the next engine release. It publishes 4.4.0 and commitsSamplesVersion = "4.4.0". This is needed before the 4.4.0 stable engine release, since a stable engine must not name4.4.0-beta7.mastertoo.Testing
Stride.Cli; unit tests for the exact version rules (TestContentTemplateResolver).PrepareSamplesForReleaseend to end (before its number handling moved to the workflow).build/Stride.Local.props, and that a build with the flag off removes them (also from VS's up-to-date check).release-samples.ymlon a fork without signing or publishing: version choice, pack, package check and smoke test passed.StridePackContentTemplateson, the-devNpack was used; turning it off and building removed it, and the published content was used again.4.4.0-beta7content was upgraded to4.4.1-dev4on load.strideCLI: listed and created templates for a dev engine, the published4.4.0-beta7engine (from before the pinning), a dev engine with the old version scheme, and 4.3; checked the template profile after repeated runs.release-samples.yml(needs the real secrets).