Nuget Release #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nuget Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET 6 | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Setup .NET 7 | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Setup dotnet 8 | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Restore dependencies | |
run: dotnet restore EverTask.sln | |
- name: Build | |
run: dotnet build EverTask.sln --no-restore --configuration Release | |
- name: Test | |
run: dotnet test test/EverTask.Tests/EverTask.Tests.csproj --no-restore --verbosity normal | |
- name: NuGet Push | |
run: | | |
dotnet pack src/EverTask.Abstractions/EverTask.Abstractions.csproj --no-build -o nupkg | |
dotnet pack src/EverTask/EverTask.csproj --no-build -o nupkg | |
dotnet pack src/Storage/EverTask.EfCore/EverTask.EfCore.csproj --no-build -o nupkg | |
dotnet pack src/Storage/EverTask.SqlServer/EverTask.SqlServer.csproj --no-build -o nupkg | |
dotnet pack src/Logging/EverTask.Serilog/EverTask.Serilog.csproj --no-build -o nupkg | |
dotnet pack src/Monitoring/EverTask.Monitor.AspnetCore.SignalR/EverTask.Monitor.AspnetCore.SignalR.csproj --no-build -o nupkg | |
dotnet nuget push "nupkg/*.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate | |
env: | |
ASPNETCORE_ENVIRONMENT: release | |