![]() That is duplicating the NuGet config of course but generally unless there are many custom NuGet sources that wouldn’t be duplicating much. NET environment variables to turn the noise down some and setting its own variables to be used in later build, test, pack, and push steps.Įcho "::set-env name=BUILD_VER::2.3.$GITHUB_RUN_NUMBER"Įcho "::set-env name=NUGET_URL::$/" -e secrets.PACKAGE_TOKEN nfig) >nfig Sometimes it’s handy to push packages to the feed from my dev box but generally I never need that. Next under my personal GitHub account that I use for the organization, I created a PAT with only read:packages for use in restoring packages on my local dev machine. Finally I added that token to the secrets of the GitHub repo an organization level secret may be handy here in cases instead. The PAT needs the write:packages OAuth scope which also currently requires the read:packages and repo scopes as well (they can be unchecked but then it won’t work).Īfter generating the token and documenting it in a secure location, I then had to authorize the PAT with SSO since my organization uses SAML SSO. For that I switched my GitHub user to a service account using a separate Edge browser profile. The projects being packed each import this file which resides in the solution root.īefore using the GitHub Package NuGet feed there’s some authentication configuration to consider.įirst I created a personal access token for a GitHub action to both restore other NuGet packages from the feed as well as push the repo’s own packages. Rather than duplicating package properties across project files, a common.props file supplies shared NuGet properties. In my case there are multiple related projects in a git repo being packed and pushed together. ![]() For GitHub packages, the key property is RepositoryUrl which will be checked when pushing to the NuGet feed. Project Configurationīefore pushing to the GitHub Packages NuGet feed, NuGet properties for the projects should be reviewed and adjusted. ![]() I decided to use GitHub Actions to build, test, pack, and push these as private NuGet packages within a GitHub organization. Recently after evaluating GitHub Container Registry I also wanted to try using NuGet feed functionality within GitHub Packages to potentially consolidate feeds across sources like Azure DevOps and Proget.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |