forked from cezarypiatek/RoslynTestKit
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (75 loc) · 2.35 KB
/
Copy pathpull-request.yml
File metadata and controls
88 lines (75 loc) · 2.35 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Pull Request
on:
pull_request:
branches: [ main, master ]
paths:
- 'src/**'
- '**/*.sln'
- '**/*.csproj'
- '**/*.props'
- '**/*.targets'
- 'Directory.Packages.props'
- 'global.json'
- 'nuget.config'
- '.config/dotnet-tools.json'
- '.github/workflows/**'
- '!**/*.md'
permissions:
contents: read
env:
DOTNET_NOLOGO: true
jobs:
build-pack-validate:
name: Build, Pack and Validate
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.draft == false }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
cache: true
cache-dependency-path: |
**/*.csproj
**/packages.lock.json
nuget.config
- name: Setup BC DevTools - netstandard2.0
uses: ./.github/actions/setup-bc-devtools
with:
version-number: '12.0.779795'
target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools\netstandard2.0'
- name: Setup BC DevTools - net8.0
uses: ./.github/actions/setup-bc-devtools
with:
version-number: '16.0.1463980'
target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools\net8.0'
- name: Setup BC DevTools - net10.0
uses: ./.github/actions/setup-bc-devtools
with:
version-number: '17.0.2273547'
target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools\net10.0'
- name: Restore
run: dotnet restore src/RoslynTestKit.sln
- name: Build
# Disabled as 'dotnet pack' also builds the project
if: false
run: >
dotnet build src/RoslynTestKit.sln
--configuration Release
--no-restore
- name: Pack
run: >
dotnet pack src/RoslynTestKit/RoslynTestKit.csproj
--configuration Release
--no-restore
--include-symbols
--output ./artifacts
/p:ContinuousIntegrationBuild=true
/p:EmbedUntrackedSources=true
/p:SymbolPackageFormat=snupkg
- name: Validate
run: |
dotnet tool install --global dotnet-validate --version 0.0.1-preview.537
dotnet-validate package local ./artifacts/*.nupkg