-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.37 KB
/
dotnet.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
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: 0 6 * * 1
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
framework: [ "net8.0-windows10.0.22621.0", "net9.0-windows10.0.22621.0" ]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.x"
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -f ${{ matrix.framework }}
- name: Test
run: dotnet test --no-build --verbosity normal -f ${{ matrix.framework }}
- name: Publish Windows (arm64/x64)
run: |
dotnet publish src/FacepunchCommitsMonitor.csproj -c Release -f ${{ matrix.framework }} -r win-x64 --nologo --self-contained
dotnet publish src/FacepunchCommitsMonitor.csproj -c Release -f ${{ matrix.framework }} -r win-arm64 --nologo --self-contained
- name: Upload Windows Builds
uses: actions/upload-artifact@v4
if: github.event_name == 'push'
with:
name: windows-builds-${{ matrix.framework }}
path: |
${{ github.workspace }}/src/bin/Release/${{ matrix.framework }}/win-x64/publish/
${{ github.workspace }}/src/bin/Release/${{ matrix.framework }}/win-arm64/publish/