TemirRa.Template.Lib
0.1.0
Prefix Reserved
Additional Details
Deprecating the Package due to flawed design and security risks.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet new install TemirRa.Template.Lib@0.1.0
This package contains a .NET Template Package you can call from the shell/command line.
Introduction
<INTRO TEXT>
Table of Contents
Quick Start
# install the template
dotnet new install src/
# show template usage
dotnet new lib --help
# create a new module from the template
dotnet new lib --force -o example/ --LibName "TemirRa.Template.Lib.Example" --IncludeServiceFiles true --IncludeWebApiFiles true --WebApiGroupPrefix "example" --IncludeMiddlewareFiles true
# uninstall the template (optional)
dotnet new uninstall src/
Documentation
<DOCUMENTATION>
DevOps
dotnet new sln --force -o src/template/ -n LibNamePlaceholder
dotnet new classlib --force -o src/template/src/ -n LibNamePlaceholder
dotnet new gitignore --force -o src/template/src/
dotnet sln src/template/ add src/template/src/
dotnet new xunit --force -o src/template/tests/ -n LibNamePlaceholder.Tests
dotnet new gitignore --force -o src/template/tests/
dotnet sln src/template/ add src/template/tests/
dotnet add src/template/tests/ reference src/template/src/
dotnet nuget locals all --clear
dotnet clean
dotnet restore
dotnet build
dotnet test --logger "console;verbosity=detailed" --logger "html;LogFilePrefix=oq"
git fetch upstream
git fetch origin
git fetch . upstream/main:origin/main
git fetch . origin/main:main
git push origin main
git merge --ff-only main
git push
Change Management
- Create a new branch for the change.
- Make the changes and commit.
- Bump the version in
src/Buildinfo.props. - Add an entry for the new version in
CHANGELOG.md. - Pull-request the branch.
- Ensure package artifacts are current.
- Publish.
Registry
# placeholder:
# <NUGET_SOURCE_NAME: <NUGET_SOURCE_NAME>
# <NUGET_SOURCE_URL: <NUGET_SOURCE_URL>
# https://forgejo.example.com/api/packages/<ORGANIZATION>/nuget/index.json
nuget.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="<NUGET_SOURCE_NAME>" value="<NUGET_SOURCE_URL>" />
</packageSources>
<packageSourceCredentials>
<<NUGET_SOURCE_NAME>>
<add key="Username" value="-" />
<add key="ClearTextPassword" value="%NUGET_SOURCE_API_KEY%" />
</<NUGET_SOURCE_NAME>>
</packageSourceCredentials>
</configuration>
# <NUGET_SOURCE_NAME>
dotnet pack --configuration Release -o nuget/
$env:NUGET_SOURCE_API_KEY = "<API_KEY>"
dotnet nuget push --source <NUGET_SOURCE_NAME> "nuget\*.nupkg" --api-key $env:NUGET_SOURCE_API_KEY --skip-duplicate
CI/CD Workflows
NuGet Build and Publish
⚠️ nuget.config configuring the package source and its credentials is required for the workflow to work.
| Parameter | Type | Description |
|---|---|---|
NUGET_RUNNER_LABEL |
Variable | The label of the runner to use for the workflow. |
NUGET_SOURCE_NAME |
Variable | The name of the NuGet source to publish to. |
NUGET_ACCESS_TOKEN |
Secret | The API key for the NuGet source. |
.github/workflows/nuget-build-publish.yml:
name: NuGet Build and Publish
on:
push:
branches:
- main
# paths:
# - <SERVICE_PATH><SERVICE_KEY>/**
# - .github/workflows/<SERVICE_KEY>-nuget-build-publish.yml
jobs:
publish:
name: NuGet Build and Publish
runs-on: ${{ vars.NUGET_RUNNER_LABEL }}
# defaults:
# run:
# working-directory: <SERVICE_PATH><SERVICE_KEY>/
steps:
- uses: actions/checkout@v4
name: Checkout
- name: Restore
env:
NUGET_SOURCE_API_KEY: ${{ secrets.NUGET_ACCESS_TOKEN }}
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --logger "console;verbosity=detailed" --logger "html;LogFilePrefix=oq"
- name: Pack
run: dotnet pack --configuration Release --no-build -o nuget/
- name: Push
env:
NUGET_SOURCE_API_KEY: ${{ secrets.NUGET_ACCESS_TOKEN }}
run: dotnet nuget push --source ${{ vars.NUGET_SOURCE_NAME }} "nuget/*.nupkg" --api-key "$NUGET_SOURCE_API_KEY" --skip-duplicate
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|