-
-
Notifications
You must be signed in to change notification settings - Fork 10
68 lines (55 loc) · 3.19 KB
/
dotnet-core.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
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore
- name: Check vulnerable NuGet packages
uses: elmahio/github-check-vulnerable-nuget-packages-action@v2
with:
projects: |
'src/Elmah.Io.AspNetCore/Elmah.Io.AspNetCore.csproj'
'src/Elmah.Io.AspNetCore.HealthChecks/Elmah.Io.AspNetCore.HealthChecks.csproj'
'src/Elmah.Io.AspNetCore.TagHelpers/Elmah.Io.AspNetCore.TagHelpers.csproj'
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Pack Elmah.Io.AspNetCore
run: dotnet pack --configuration Release src/Elmah.Io.AspNetCore/Elmah.Io.AspNetCore.csproj /p:Version=5.2.${{ github.run_number }}-pre
- name: Pack Elmah.Io.AspNetCore.TagHelpers
run: dotnet pack --configuration Release src/Elmah.Io.AspNetCore.TagHelpers/Elmah.Io.AspNetCore.TagHelpers.csproj /p:Version=5.2.${{ github.run_number }}-pre
- name: Pack Elmah.Io.AspNetCore.HealthChecks
run: dotnet pack --configuration Release src/Elmah.Io.AspNetCore.HealthChecks/Elmah.Io.AspNetCore.HealthChecks.csproj /p:Version=5.2.${{ github.run_number }}-pre
- name: Install dotnet-validate
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
- name: Validate Elmah.Io.AspNetCore
run: dotnet-validate package local src/Elmah.Io.AspNetCore/bin/Release/Elmah.Io.AspNetCore.5.2.${{ github.run_number }}-pre.nupkg
- name: Validate Elmah.Io.AspNetCore.TagHelpers
run: dotnet-validate package local src/Elmah.Io.AspNetCore.TagHelpers/bin/Release/Elmah.Io.AspNetCore.TagHelpers.5.2.${{ github.run_number }}-pre.nupkg
- name: Validate Elmah.Io.AspNetCore.HealthChecks
run: dotnet-validate package local src/Elmah.Io.AspNetCore.HealthChecks/bin/Release/Elmah.Io.AspNetCore.HealthChecks.5.2.${{ github.run_number }}-pre.nupkg
# - name: Push Elmah.Io.AspNetCore to nuget.org
# run: dotnet nuget push src/Elmah.Io.AspNetCore/bin/Release/Elmah.Io.AspNetCore.5.2.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
# if: ${{ github.event_name == 'push' }}
# - name: Push Elmah.Io.AspNetCore.TagHelpers to nuget.org
# run: dotnet nuget push src/Elmah.Io.AspNetCore.TagHelpers/bin/Release/Elmah.Io.AspNetCore.TagHelpers.5.2.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
# if: ${{ github.event_name == 'push' }}
# - name: Push Elmah.Io.AspNetCore.HealthChecks to nuget.org
# run: dotnet nuget push src/Elmah.Io.AspNetCore.HealthChecks/bin/Release/Elmah.Io.AspNetCore.HealthChecks.5.2.${{ github.run_number }}-pre.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
# if: ${{ github.event_name == 'push' }}