Skip to content

Publish Package TemplatingLibrary #1

Publish Package TemplatingLibrary

Publish Package TemplatingLibrary #1

name: Publish Package TemplatingLibrary
on:
push:
tags:
- 'v*' # Trigger on version tags like v1.2.3
workflow_dispatch: # Allows manual trigger from the GitHub UI
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version:
8.0.x
9.0.x
- name: Restore dependencies
run: dotnet restore FAST.FBasic.TemplatingLibrary/FAST.FBasic.TemplatingLibrary.csproj
- name: Build project
run: dotnet build FAST.FBasic.TemplatingLibrary/FAST.FBasic.TemplatingLibrary.csproj --configuration Release --no-restore
- name: Pack NuGet package
run: dotnet pack FAST.FBasic.TemplatingLibrary/FAST.FBasic.TemplatingLibrary.csproj --configuration Release --no-build --output ./nuget
- name: Publish package to NuGet.org
run: dotnet nuget push ./nuget/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json