YOUR_DESCRIPTION
You can build the library locally with:
dotnet pack ./Source/LIBRARY_NAME.csproj -c Release -p:Version=1.0.0 -o ./Artifacts
To install it into a local game project (Replace the path after -s to your local path.):
dotnet add package LIBRARY_NAME -s "C:\ThePathToYourLibraryBuilds\"
- To publish your library to NuGet.
- Generate a new API key from https://www.nuget.org/account/apikeys.
- Allow the key to
Push
andPush new packages and package versions
. - Copy the key.
- Go to your GitHub repo for your library.
- Go in the
Settings
. - In the Security section, go in
Secrets and variables
. - Select
Actions
. - In the repository secrets, create a new repository secret.
- Name it
NUGETAPIKEY
. - Paste the NuGet API key from earlier.
- Click
Add secret
.
- Go in the
- To publish the library to NuGet, create a new version tag with git:
git tag v0.0.1
git push --tags
- This will launch a pipeline on GitHub that will automatically build your package and release it on NuGet.
- To release new versions of the library, repeat step 3.