-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (43 loc) · 2.05 KB
/
nuget-push-public.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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: |
7.0.x
8.0.x
env:
DOTNET_INSTALL_DIR: /usr/share/dotnet
- name: Install .NET MAUI workload
run: dotnet workload install maui
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Restore dependencies
run: |
dotnet restore ./src/CSharp/Cores/EasyMicroservices.UI.Cores.sln
dotnet restore ./src/CSharp/MauiComponents/EasyMicroservices.UI.MauiComponents.sln
dotnet restore ./src/CSharp/BlazorComponents/EasyMicroservices.UI.BlazorComponents.sln
- name: Build
run: |
dotnet build ./src/CSharp/Cores/EasyMicroservices.UI.Cores.sln --no-restore
dotnet build ./src/CSharp/MauiComponents/EasyMicroservices.UI.MauiComponents.sln --no-restore
dotnet build ./src/CSharp/BlazorComponents/EasyMicroservices.UI.BlazorComponents.sln --no-restore
- name: Test
run: |
dotnet test ./src/CSharp/Cores/EasyMicroservices.UI.Cores.sln --no-build --verbosity normal
dotnet test ./src/CSharp/MauiComponents/EasyMicroservices.UI.MauiComponents.sln --no-build --verbosity normal
dotnet test ./src/CSharp/BlazorComponents/EasyMicroservices.UI.BlazorComponents.sln --no-build --verbosity normal
- name: Create the package
run: |
dotnet pack ./src/CSharp/Cores/EasyMicroservices.UI.Cores.sln --output nupkgs
dotnet pack ./src/CSharp/MauiComponents/EasyMicroservices.UI.MauiComponents.sln --output nupkgs
dotnet pack ./src/CSharp/BlazorComponents/EasyMicroservices.UI.BlazorComponents.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