ci: supply SixLabors.ImageSharp 4 license key in CI#221
Merged
Conversation
ImageSharp 4.0 enforces a build-time license key for projects that directly reference it (ImGui.App). Add a Directory.Build.props bridge mapping the SIXLABORS_LICENSE_KEY environment variable to the SixLaborsLicenseKey MSBuild property, and surface the secret as an env var on every CI job that compiles ImGui.App (build, ios-build, ios-simulator). Works with either a repo or org secret named SIXLABORS_LICENSE_KEY.
|
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
Directory.Packages.propsalready pinsSixLabors.ImageSharp4.0.0, and v4 is the first release to enforce a license key at build time for projects that directly reference it — here,ImGui.App. Without a key the build fails:What this does
Directory.Build.props(new): bridges theSIXLABORS_LICENSE_KEYenvironment variable into theSixLaborsLicenseKeyMSBuild property (only when not already set), so the key works regardless of how MSBuild is invoked — including via the KtsuBuild CLI pipeline, which doesn't allow appending-p:flags. Also enables local builds viaexport SIXLABORS_LICENSE_KEY=.....github/workflows/dotnet.yml: surfaces the secret asSIXLABORS_LICENSE_KEYon every job that compilesImGui.App—build,ios-build, andios-simulator(thePackageReferenceis unconditional, so it applies onnet10.0-iostoo).Works with either a repo or org secret named
SIXLABORS_LICENSE_KEY— both resolve through the same${{ secrets.* }}context.Required manual step
This wiring only takes effect once the secret exists:
SIXLABORS_LICENSE_KEY(Org → Settings → Secrets and variables → Actions → New organization secret), and grant its repository-access policy toimguiapp(or "All repositories").Verification
Confirmed locally that the bridge populates the property: with the env var unset the build reports "No Six Labors license found"; with
SIXLABORS_LICENSE_KEYset it advances to "validating Six Labors license" (parsing the supplied value). A valid key validates and the build proceeds.https://claude.ai/code/session_01VssYGnCiebd5GdniUmACAd
Generated by Claude Code