Skip to content

NuGet Push Public

NuGet Push Public #14

name: NuGet Push Public
on: [workflow_dispatch]
jobs:
build-test-prep-push:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
env:
DOTNET_INSTALL_DIR: /usr/share/dotnet
- name: Restore dependencies
run: |
dotnet restore ./src/CSharp/Blazor/EasyMicroservices.UI.Ordering.Blazor.sln
dotnet restore ./src/CSharp/Cores/EasyMicroservices.UI.Ordering.Core.sln
- name: Build
run: |
dotnet build ./src/CSharp/Blazor/EasyMicroservices.UI.Ordering.Blazor.sln --no-restore
dotnet build ./src/CSharp/Cores/EasyMicroservices.UI.Ordering.Core.sln --no-restore
- name: Test
run: |
dotnet test ./src/CSharp/Blazor/EasyMicroservices.UI.Ordering.Blazor.sln --no-build --verbosity normal
dotnet test ./src/CSharp/Cores/EasyMicroservices.UI.Ordering.Core.sln --no-build --verbosity normal
- name: Create the package
run: |
dotnet pack ./src/CSharp/Blazor/EasyMicroservices.UI.Ordering.Blazor.sln --output nupkgs
dotnet pack ./src/CSharp/Cores/EasyMicroservices.UI.Ordering.Core.sln --output nupkgs
- name: Publish the package to NuGet.org
run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate