Skip to content

Commit

Permalink
Merge remote-tracking branch 'template/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Joschiller committed Jun 25, 2023
2 parents 0308743 + dc27504 commit 0e37c16
Showing 1 changed file with 59 additions and 26 deletions.
85 changes: 59 additions & 26 deletions Workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>...</authors>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="file">LICENSE.md</license>
<readme>docs\Documentation.md</readme>
<projectUrl>https://.../</projectUrl>
<description>$description$</description>
<copyright>$copyright$</copyright>
<tags>... ...</tags>
</metadata>
<files>
<file src="..\..\LICENSE.md" target="" />
<file src="..\..\Documentation.md" target="docs\" />
</files>
</package>
```
- 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

Expand Down

0 comments on commit 0e37c16

Please sign in to comment.