Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Publish NuGet Package

on:
workflow_dispatch:
inputs:
version:
description: 'NuGet Package Version (e.g., 1.1.0)'
required: true
default: '1.1.0'

jobs:
publish:
runs-on: windows-latest
permissions:
contents: read
id-token: write

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Authenticate with Azure
uses: azure/login@v1
with:
creds: ${{ secrets.EZRADIUS_CLIENT_DEPLOYER }}

- name: Install AzureSignTool
run: dotnet tool install --global AzureSignTool

- name: Build NuGet Package
run: >
dotnet build .\EZRadiusClient\EZRadiusClient.csproj
-c Release -p:Version=${{ inputs.version }}

- name: Sign NuGet Package
run: |
$akvToken = (az account get-access-token --resource https://vault.azure.net --query "accessToken").Replace('"','')
azuresigntool sign --azure-key-vault-url https://codesigningkeytos.vault.azure.net/ -kvc globalsign --azure-key-vault-accesstoken $akvToken -tr http://timestamp.digicert.com .\EZRadiusClient\bin\Release\EZRadiusClient.${{ inputs.version }}.nupkg
shell: pwsh

- name: Verify NuGet Package
run: >
dotnet nuget verify --all
.\EZRadiusClient\bin\Release\EZRadiusClient.${{ inputs.version }}.nupkg

- name: Publish to NuGet.org
run: >
dotnet nuget push
.\EZRadiusClient\bin\Release\EZRadiusClient.${{ inputs.version }}.nupkg
--api-key ${{ secrets.NUGET_API_KEY }}
--source https://api.nuget.org/v3/index.json
--skip-duplicate

- name: Upload Package Artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: >
.\EZRadiusClient\bin\Release\EZRadiusClient.${{ inputs.version }}.nupkg
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ To run the SampleApp, it requires a token scope ID, a url for EZRadius instance
2) Use the SampleApp to see how the client can be used and configured (must have EZRadius instance with a Radius policy)
3) If you would like to call the sample app from the command line, you can download a signed version from [here](https://download.keytos.io/Downloads/EZRADIUS/RADIUSConsole.exe)

## Publishing a New Release

To publish a new version of the EZRadiusClient NuGet package:

1. Navigate to the **Actions** tab in the GitHub repository
2. Select the **Publish NuGet Package** workflow from the left sidebar
3. Click the **Run workflow** button
4. Enter the new version number (e.g., `1.2.0`) in the version input field
5. Click **Run workflow** to start the process

The workflow will:
- Build the NuGet package with the specified version
- Sign the package using Azure Code Signing
- Verify the package signature
- Publish the package to NuGet.org
- Upload the package as an artifact for reference

**Note:** Ensure that the version number follows semantic versioning (MAJOR.MINOR.PATCH) and hasn't been published before.

## Displaying Radius Policies

Starting with a basic feature, the ```show``` verb will display all the Radius policies. This command calls the ```GetRadiusPoliciesAsync()``` method and prints to the console the Radius policies and their attributes currently in the passed EZRadius instance.
Expand Down