-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.66 KB
/
build.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
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test .NET
env:
SECRET_BASE_URL: ${{ secrets.SECRET_BASE_URL }}
SECRET_API_KEY: ${{ secrets.SECRET_API_KEY }}
SECRET_LOG_ID: ${{ secrets.SECRET_LOG_ID }}
SECRET_HEARTBEAT_ID: ${{ secrets.SECRET_HEARTBEAT_ID }}
run: dotnet test --no-restore --verbosity normal
- name: Pack
run: dotnet pack --configuration Release src/Elmah.Io.Client/Elmah.Io.Client.csproj /p:Version=5.2.${{ github.run_number }}-pre
#- name: Push
# run: dotnet nuget push src/Elmah.Io.Client/bin/Release/Elmah.Io.Client.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' }}
build_net_framework:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: nuget/setup-nuget@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Restore
run: nuget restore Elmah.Io.Client.sln
- name: Build
run: msbuild Elmah.Io.Client.sln /t:Build /p:Configuration=Release
- name: Test
run: dotnet vstest test\Elmah.Io.Client.Test\bin\Release\net462\Elmah.Io.Client.Test.dll