ci: fix ReadyToRun build + auto-publish release on version bump - #3
Merged
Conversation
Two issues caused the Windows publish to fail with NETSDK1094
("a valid runtime package was not found"):
- The publish step ran with --no-restore, but the preceding restore
did not know ReadyToRun was requested, so the crossgen2 R2R package
was never restored. Dropping --no-restore lets publish restore it
(PublishReadyToRun=true is on the publish command line).
- The runner used the .NET 10 SDK instead of the 9.0.x installed by
setup-dotnet. Add global.json pinning the SDK to 9.0.x (the target
framework) so builds are deterministic.
https://claude.ai/code/session_01FhKJ3kR6pgaR4N3sWSfbFX
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.
What this does
Two CI changes:
1. Fix
NETSDK1094(ReadyToRun publish failure)build.yml— drop--no-restorefrom Publish so the crossgen2 R2R package is restored (-p:PublishReadyToRun=truestays).global.json— pin the SDK to9.0.x(rollForward: latestFeature) so the runner stops using the .NET 10 SDK that caused the failure.2. Auto-release on version bump
release.yml— also runs on pushes tomaster. It reads<InformationalVersion>from the csproj and, if nov<version>tag exists yet, builds + zips + publishes the GitHub Release automatically. Pushingmasterwithout a version change is a no-op (no release spam). Manual tag pushes andworkflow_dispatchstill work.Effect of merging
Merging to
masterwill fix the build and automatically publish the v2.2.0 release (current csproj version, nov2.2.0tag exists yet).YAML + JSON validated locally.
https://claude.ai/code/session_01FhKJ3kR6pgaR4N3sWSfbFX