-
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.35 KB
/
dotnet-core-release.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
46
47
name: .Net Standard Release
on:
push:
branches:
- release/*
jobs:
build:
runs-on: ${{ matrix.os }}
env:
VERSION: 4.3.0-alpha.11
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core 2.2.108
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.108
- name: Setup .NET Core 3.1.302
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.302
- name: Setup side by side .NET SDKs on Windows
if: matrix.os == 'windows-latest'
run: |
SET DOTNET_22_ROOT=%DOTNET_ROOT:3.1.302=2.2.108%
xcopy /s /y /d %DOTNET_31_ROOT% %DOTNET_ROOT%
shell: cmd
- name: Setup side by side .NET SDKs on ${{ matrix.os }}
if: matrix.os != 'windows-latest'
run: |
rsync -a ${DOTNET_ROOT/3.1.302/2.2.108}/* $DOTNET_ROOT/
- name: Build with netcoreapp
run: dotnet build --configuration Release
- name: Unit Testing
run: dotnet test
- name: Create Packages
run: dotnet pack --configuration Release --output ../nupkgs -p:PackageVersion=${{env.VERSION}} --include-source --include-symbols
- name: Deploy Package Nuget
run: dotnet nuget push -k ${{secrets.NUGET_API_TOKEN}} -s https://api.nuget.org/v3/index.json ../nupkgs/*.${{env.VERSION}}.nupkg --skip-duplicate