Skip to content

Nuget Publish On-Demand #1

Nuget Publish On-Demand

Nuget Publish On-Demand #1

name: Nuget Publish On-Demand
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-quality: preview
- name: Clean Last Build
run: dotnet clean --framework net9.0 --configuration Release
- name: Clean old Packages
run: rm --force src/Validations/bin/Release/Triplex.Validations*.nupkg
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --framework net9.0 --configuration Release
- name: Test
run: dotnet test --no-build --verbosity normal --framework net9.0 --configuration Release
- name: Package
run: dotnet pack --configuration Release
- name: Deploy To Nuget.org
run: |
cd src/Validations/bin/Release
dotnet nuget push "**/*.nupkg" -k ${{secrets.NUGET_DEPLOYMENT_KEY}} -s https://api.nuget.org/v3/index.json