Repository navigation
Add a release workflow that publishes to NuGet with Trusted Publishing - #2
Merged
Merged
Conversation
Runs on a pushed v* tag, or by hand for an existing tag. It checks the tag matches the package version, tests, packs, publishes to nuget.org through NuGet Trusted Publishing (no stored API key) and creates a GitHub release whose notes come from that version's CHANGELOG.md section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZbQj8GuvpB7Qn8LueTNWw
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
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.
Adds
.github/workflows/release.yml, which publishes Cimon.Net to nuget.org and creates a GitHub release. NuGet currently has only 1.0.0, so this is what will publish 2.0.0.How it runs
v*tag, for examplev2.1.0.v2.0.0, which points atmain, without deleting and re-creating it.Steps
<Version>inCimonPlc.csproj.Cimon.Net.<version>.nupkgand the.snupkgsymbols package.CHANGELOG.md, falling back to a changelog link.NuGet/login@v1(Trusted Publishing): a GitHub OIDC token is exchanged for an API key that expires after about an hour, so no NuGet key is stored in the repository.--skip-duplicate, so re-runs are safe.Setup needed before running it
archofthings, repositoryCimon.Net, workflowrelease.yml, packageCimon.Net, scope "push only new package versions".NUGET_USERwith the nuget.org profile name.Testing
dotnet test -c Release: 149 tests pass.dotnet packproducesCimon.Net.2.0.0.nupkgandCimon.Net.2.0.0.snupkg.## 2.0.0section.After merging
Go to Actions → Release → Run workflow, keep the branch as
main, and enter the tagv2.0.0.