-
Notifications
You must be signed in to change notification settings - Fork 12
78 lines (68 loc) · 2.78 KB
/
dotnetcore.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
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
name: .NET Core
on:
workflow_call:
inputs:
new_tag:
type: string
required: false
new_version:
type: string
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v1
- name: Setup .NET
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # @v4.0.0
with:
dotnet-version: |
7.0.x
- name: Set version
if: ${{ inputs.new_tag }}
run: |
echo New Tag: ${{ inputs.new_tag }}
echo New Version: ${{ inputs.new_version }}
cat > ./Directory.Build.props << 'EOF'
<Project>
<PropertyGroup>
<Version>${{ inputs.new_version }}</Version>
<FileVersion>${{ inputs.new_version }}</FileVersion>
</PropertyGroup>
</Project>
EOF
- name: Build
run: |
dotnet build --configuration Release
- name: Test
run: dotnet test --configuration Release --logger "trx;LogFileName=test-results.trx"
- name: Upload MaintainabilityAnalyzers Artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Philips.CodeAnalysis.MaintainabilityAnalyzers-${{ inputs.new_tag }}
retention-days: 1
path: ./Packages/Philips.CodeAnalysis.MaintainabilityAnalyzers.*.nupkg
- name: Upload DuplicateCodeAnalyzer Artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Philips.CodeAnalysis.DuplicateCodeAnalyzer-${{ inputs.new_tag }}
retention-days: 1
path: ./Packages/Philips.CodeAnalysis.DuplicateCodeAnalyzer.*.nupkg
- name: Upload MoqAnalyzers Artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Philips.CodeAnalysis.MoqAnalyzers-${{ inputs.new_tag }}
retention-days: 1
path: ./Packages/Philips.CodeAnalysis.MoqAnalyzers.*.nupkg
- name: Upload MsTestAnalyzers Artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Philips.CodeAnalysis.MsTestAnalyzers-${{ inputs.new_tag }}
retention-days: 1
path: ./Packages/Philips.CodeAnalysis.MsTestAnalyzers.*.nupkg
- name: Upload SecurityAnalyzers Artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Philips.CodeAnalysis.SecurityAnalyzers-${{ inputs.new_tag }}
retention-days: 1
path: ./Packages/Philips.CodeAnalysis.SecurityAnalyzers.*.nupkg