Skip to content

Add CI and trusted publishing workflows, version from git tags via MinVer - #2

Merged
holonsoftFounder merged 4 commits into
mainfrom
feature/ci-publishing
Sep 6, 2026
Merged

Add CI and trusted publishing workflows, version from git tags via MinVer#2
holonsoftFounder merged 4 commits into
mainfrom
feature/ci-publishing

Conversation

@holonsoftFounder

@holonsoftFounder holonsoftFounder commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

  • CI workflow (ci.yml): restore, build, test and pack on ubuntu-latest and windows-latest for pushes to main, pull requests and manual dispatch. Packages from the Linux runner are uploaded as a build artifact.
  • Publish workflow (publish.yml): triggered by v* tags, runs in the release environment 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.
  • MinVer now derives the package version from git tags, so no manual version bumps in project files.
  • AllowSlashPrefix defaults to OperatingSystem.IsWindows() instead of true. The first Linux CI run exposed that every absolute path value (/tmp/...) was read as an option. Tests that use the classic /name syntax enable the prefix explicitly; the lexer tests cover the default, the enabled and the disabled behavior. README and migration notes updated.
  • README badges for CI and NuGet.
  • .vscode/ is ignored (editor-local settings).

Prerequisites before the first tag

  • nuget.org trusted publishing policy for repo holonsoft/CmdLineParser, workflow publish.yml, environment release.
  • Repository secret NUGET_USER set to the nuget.org profile name (done).

Test plan

  • CI green on both runners for this PR
  • CI green on main after merge
  • Tag v5.0.0 and verify both packages appear on nuget.org

🤖 Generated with Claude Code

christian.vogt@hiquaro.com and others added 4 commits September 5, 2026 13:18
…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>
@holonsoftFounder
holonsoftFounder merged commit 8e8fad6 into main Sep 6, 2026
2 checks passed
@holonsoftFounder
holonsoftFounder deleted the feature/ci-publishing branch September 6, 2026 10:03
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