-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.63 KB
/
ci-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
48
49
50
name: CI-Release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- created
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Pack
run: dotnet pack AsyncScheduler/AsyncScheduler.csproj --configuration Release
- name: Add github test logger
run: dotnet add AsyncSchedulerTest/AsyncSchedulerTest.csproj package GitHubActionsTestLogger
- name: Build Tests
run: dotnet build AsyncScheduler/AsyncScheduler.csproj
- name: Test .NET Core 3.1
run: dotnet test --no-restore --verbosity normal --logger GitHubActions --framework netcoreapp3.1
#- name: Test .NET Core 2.1
# run: dotnet test --no-restore --verbosity normal --framework netcoreapp2.1
- name: Test .NET Framework 4.7.2
run: dotnet test --no-restore --verbosity normal --logger GitHubActions --framework net472
- name: Artifacts
uses: actions/upload-artifact@v2
with:
name: nuget
path: AsyncScheduler/**/*.s?nupkg
- name: Push to MyGet
env:
NUGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
run: dotnet nuget push **/*.nupkg --source https://www.myget.org/F/dotnetasyncscheduler/api/v3/index.json --api-key "$env:NUGET_API_KEY"
shell: pwsh