diff --git a/Workflows.md b/Workflows.md index aca6af0..5a8b0eb 100644 --- a/Workflows.md +++ b/Workflows.md @@ -9,41 +9,74 @@ 3. Simplify code - remove unnecessary imports - check autocompletion hints -4. Build and release library (https://learn.microsoft.com/de-de/nuget/quickstart/create-and-publish-a-package-using-visual-studio?tabs=netcore-cli) - - 1. configure project > Tab Package: - - Package version - - Authors - - Company - - Description - - Licensing > File `..\..\LICENSE.md` - - Repository URL - - Tags - - Assembly neutral language - - Assembly version - - Assembly file version - 2. set `Build > Configuration Manager` to Release - 3. right-click project in explorer and click "Pack" OR configure `Package > Generate NuGet package on build` - > Packed file will be shown in console output (usually `\bin\Release\...`) - 4. if expried, create a new API key: https://www.nuget.org/account/apikeys +4. Build and release library + 1. configure project and nuget + - first setup: + 1. configure project > Tab Application: + - Assembly name + - Assembly information: + - Title + - Description + - Assembly version + - File version + - Neutral language + 2. set `Build > Configuration Manager` to Debug + 3. run `Build > Build Solution` + 4. for first setup: + 1. run once using `Tools > Command Line > Developer Command Prompt` + > in the folder where the csproj is located (!): `nuget spec NameOfTheProject` + 2. Edit generated `NameOfTheProject.nuspec` + ```xml + + + + $id$ + $version$ + $title$ + ... + true + LICENSE.md + docs\Documentation.md + https://.../ + $description$ + $copyright$ + ... ... + + + + + + + ``` + - authors + - requireLicenseAcceptance = true + - license (type=file and refer to license file) + - readme + - projectUrl + - tags + - files section + - subsequent updates: + 1. configure project > Tab Application: + - Assembly information: increase Assembly version and File version + 2. set `Build > Configuration Manager` to Debug + 3. run `Build > Build Solution` + 2. run `nuget pack` + > Packed .nupkg-file will be shown in console output + 3. test package locally by opening another project > Manage NuGet Packages > Open NuGet Settings (top right corner) > add path of the nugpg-files folder as a source -> Add the package + 4. if expired, create a new API key: https://www.nuget.org/account/apikeys - Glob Pattern: `*` 5. publish package: - - `dotnet nuget push someFile.nupkg --api-key someKey --source https://api.nuget.org/v3/index.json` - - 6. Add ReadMe - 1. Open NuGet > Profile > Manage Packages - 2. Click "Edit" for package in latest version - 3. Got to ReadMe > File - 4. Select `Documentation.md` - + - Test: `dotnet nuget push someFile.nupkg --api-key someKey --source https://int.nugettest.org/v3/index.json` + - Prod: `dotnet nuget push someFile.nupkg --api-key someKey --source https://api.nuget.org/v3/index.json` 5. Create Release in Repository 1. `git checkout -b X.X.X-rc` 2. push new branch 3. Github > Tags > Create a new Release + - Tag: "vX.X.X" -> set to create "on publish" - Target branch: "X.X.X-rc" - Title: "vX.X.X" - Description: Copy from Changelog + - Files: add nuget package # Update against template