forked from w-ahmad/WinUI.TableView
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.76 KB
/
Copy pathci-build.yml
File metadata and controls
70 lines (60 loc) · 1.76 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
name: ci-build
on:
push:
branches: main
paths-ignore:
- 'docs/**'
- 'samples/**'
pull_request:
branches: main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: |
8.0.x
9.0.x
10.0.100
- name: Build
run: |
msbuild /restore `
/t:Build,Pack src/WinUI.TableView.csproj `
/p:Configuration=Release `
/p:Version=0.0.${{ github.run_number }}-dev
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1.3
- name: Build Tests
run: |
msbuild /restore `
/t:Build tests/WinUI.TableView.Tests.csproj `
/p:Platform=x64 `
/p:Configuration=Release
- name: Run Tests
run: |
tests\bin\x64\Release\net10.0-windows10.0.26100.0\WinUI.TableView.Tests.build.appxrecipe --logger:"console;verbosity=normal" /InIsolation
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: NuGet Packages
path: artifacts/NuGet/Release
publish:
needs: build
runs-on: windows-latest
environment: ci-nuget-publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: NuGet Packages
path: packages
- name: Push to NuGet
run: |
dotnet nuget push packages\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate