-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (78 loc) · 2.6 KB
/
Build.yml
File metadata and controls
100 lines (78 loc) · 2.6 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
89
90
91
92
93
94
95
96
97
98
99
100
name: Build
on:
workflow_dispatch:
push:
branches: [ "main" ]
workflow_call:
outputs:
version:
value: ${{ jobs.build.outputs.version }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Get next version
id: version
uses: reecetech/version-increment@2023.10.2
- name: Build
run: |
dotnet build -c Release -p:Version=${{ steps.version.outputs.version }}
- name: Upload PackScan.PackagesProvider.Abstractions
uses: actions/upload-artifact@v4.3.1
with:
name: PackScan.PackagesProvider.Abstractions.${{ steps.version.outputs.version }}.nupkg
path: artifacts/PackScan.PackagesProvider.Abstractions.${{ steps.version.outputs.version }}.nupkg
if-no-files-found: error
- name: Upload PackScan.Analyzer
uses: actions/upload-artifact@v4.3.1
with:
name: PackScan.Analyzer.${{ steps.version.outputs.version }}.nupkg
path: artifacts/PackScan.Analyzer.${{ steps.version.outputs.version }}.nupkg
if-no-files-found: error
- name: Upload PackScan.Defaults
uses: actions/upload-artifact@v4.3.1
with:
name: PackScan.Defaults.${{ steps.version.outputs.version }}.nupkg
path: artifacts/PackScan.Defaults.${{ steps.version.outputs.version }}.nupkg
if-no-files-found: error
- name: Upload PackScan.Tool
uses: actions/upload-artifact@v4.3.1
with:
name: PackScan.Tool.${{ steps.version.outputs.version }}.nupkg
path: artifacts/PackScan.Tool.${{ steps.version.outputs.version }}.nupkg
if-no-files-found: error
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dotnet-version: 3.1.x
dotnet-framework: netcoreapp3.1
- dotnet-version: 5.0.x
dotnet-framework: net5.0
- dotnet-version: 6.0.x
dotnet-framework: net6.0
- dotnet-version: 7.0.x
dotnet-framework: net7.0
- dotnet-version: 8.0.x
dotnet-framework: net8.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Run Tests
run: |
dotnet test -f ${{ matrix.dotnet-framework }} -c Release