NCIOCPL / NCI.OCPL.Api.Shared

Common code shared between APIs
0 stars 1 forks source link

Enabler: Publish NuGet packages #8

Closed blairlearn closed 3 years ago

blairlearn commented 3 years ago

As a Developer, I want NuGet packages to be automatically created from releases, so the process is repeatable.

ESTIMATE TBD

Acceptance Criteria

Scenario: NuGet packages created on release creation
  Given A release branch exists
  When a release is tagged
  Then  NuGet packages are created for each shared component.

Resources:

Notes

All components in the repository should have the same package version number. This is a manual process until we figure out a better way to manage it.

This comes from the Create Nuget Package of Base Classes and Tools issue in the dotnet-api-template repository.


Solution

Prerequisites

Tasks

Technical Notes

See: Configuring dotnet CLI for use with GitHub Packages

Run a workflow using the publish event with type create

publish command is dotnet nuget push <project-path> --source github This will give a warning: "warn : Please use the --api-key option when publishing to GitHub Packages". This is a known bug in the dotnet command.

You will need to explicitly configure the github source. See Authenticating to GitHub Packages