-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (32 loc) · 1.4 KB
/
main.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
name: SimpleRpc-CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: |
dotnet restore ./SimpleRpc.sln
- name: Build project and Generate NuGet package
run: |
cd ./src/
dotnet build --configuration Release --nologo ./SimpleRpc.Shared/SimpleRpc.Shared.csproj || true
dotnet build --configuration Release --nologo ./SimpleRpc.Server/SimpleRpc.Server.csproj || true
dotnet build --configuration Release --nologo ./SimpleRpc.Client/SimpleRpc.Client.csproj || true
dotnet pack -c Release --nologo ./SimpleRpc.Shared/SimpleRpc.Shared.csproj -o ../nupkgs || true
dotnet pack -c Release --nologo ./SimpleRpc.Server/SimpleRpc.Server.csproj -o ../nupkgs || true
dotnet pack -c Release --nologo ./SimpleRpc.Client/SimpleRpc.Client.csproj -o ../nupkgs || true
# Runs a set of commands using the runners shell
- name: Publish nuget package.
run: |
dotnet nuget push ./nupkgs/*.nupkg --no-symbols true --skip-duplicate true -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json || true