-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (44 loc) · 1.73 KB
/
dotnetcore.yml
File metadata and controls
59 lines (44 loc) · 1.73 KB
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
51
52
53
54
55
56
57
58
59
name: .NET Core
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Extract version
shell: pwsh
run: |
$matches = Select-String -path Directory.build.props '<Version>(\d+\.\d+\.\d+)</Version>'
$version_local = $matches.Matches[0].Groups[1].Value
echo "VERSION=$version_local" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.406
- name: Setup .NET Core for Example project
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Install local tools
run: dotnet tool restore
- name: Dotnet Pack SDK
run: dotnet pack src/GiraffeGenerator.Sdk -c Release -o bin/nupkg /p:Version=${{ env.VERSION }}
- name: Dotnet Pack Tool
run: dotnet pack src/GiraffeGenerator -c Release -o bin/nupkg /p:Version=${{ env.VERSION }}
- name: Dotnet Merge Nugets
run: dotnet mergenupkg --source bin/nupkg/GiraffeGenerator.Sdk.${{ env.VERSION }}.nupkg --other bin/nupkg/GiraffeGenerator.${{ env.VERSION }}.nupkg --tools --only-files
- name: Dotnet Pack Core
run: dotnet pack src/GiraffeGenerator.Core -c Release -o bin/nupkg /p:Version=${{ env.VERSION }}
- name: Dotnet build Example project
run: dotnet build src/Example -c Release
- name: Dotnet force restore
run: dotnet restore --force --no-cache
- name: Run Integration Tests
run: dotnet test -c Release