Add CI and trusted publishing workflows, version from git tags via MinVer - #2
Merged
Conversation
…nVer - ci.yml: build, test and pack on ubuntu and windows for pushes to main and pull requests - publish.yml: on v* tags pack, verify the package version matches the tag, log in to nuget.org via OIDC (NuGet/login, environment release) and push both packages - MinVer replaces the hardcoded version; tag prefix v, minimum 5.0, untagged builds are 5.0.x-preview.0.N - README: CI and NuGet badges Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…options Path.GetTempFileName() returns /tmp/... on Linux, which the default AllowSlashPrefix=true option turned into an option token. The test now disables the slash prefix explicitly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Absolute paths start with '/' on Unix-like systems, so a default of AllowSlashPrefix=true turned every path value into an option token there. The default is now OperatingSystem.IsWindows(). Tests that use the classic /name syntax enable the prefix explicitly, the lexer tests cover the default, the enabled and the disabled behavior, and the fuzz test exercises both settings on every OS. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
ci.yml): restore, build, test and pack onubuntu-latestandwindows-latestfor pushes tomain, pull requests and manual dispatch. Packages from the Linux runner are uploaded as a build artifact.publish.yml): triggered byv*tags, runs in thereleaseenvironment and pushes both packages to nuget.org via trusted publishing (OIDC,NuGet/login). No API key is stored anywhere. A check verifies the packed version matches the tag.AllowSlashPrefixdefaults toOperatingSystem.IsWindows()instead oftrue. The first Linux CI run exposed that every absolute path value (/tmp/...) was read as an option. Tests that use the classic/namesyntax enable the prefix explicitly; the lexer tests cover the default, the enabled and the disabled behavior. README and migration notes updated..vscode/is ignored (editor-local settings).Prerequisites before the first tag
holonsoft/CmdLineParser, workflowpublish.yml, environmentrelease.NUGET_USERset to the nuget.org profile name (done).Test plan
mainafter mergev5.0.0and verify both packages appear on nuget.org🤖 Generated with Claude Code