Repository navigation
Conversation
Add a Publish workflow that runs when a GitHub release is published. It checks the tag matches <Version>, runs the tests, packs, and pushes the package and symbols to nuget.org. NuGet/login exchanges the run's OIDC token for a one-hour API key, so no key is stored. Needs a trusted publishing policy on nuget.org for this repo and publish.yml, and a NUGET_USER secret with the nuget.org username.
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 a
Publishworkflow that pushes the package to nuget.org when a GitHub release is published. It uses NuGet trusted publishing, so no API key is stored:NuGet/loginexchanges the run's GitHub OIDC token for a one-hour key.What it does
<Version>insrc/TeslaAPI.csproj, and fails if not..nupkgto nuget.org. The.snupkggoes up with it.Setup needed before it works
at0ddtesla-apipublish.ymlNUGET_USERcontaining your nuget.org username (your profile name, not your email). Go to Settings → Secrets and variables → Actions → New repository secret.Checked locally: the version check returns
1.2.0, the pack step producesTesla-API.1.2.0.nupkgand.snupkg, and the YAML parses. The workflow itself only runs on a published release, so it can't be tested from this PR.README.mdgains a short Releasing section.