-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (74 loc) · 2.8 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
DotNetVersion: '8.0.403'
UnoCheck_Version: '1.26.1'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
name: Checkout sources
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DotNetVersion }}
- uses: dotnet/nbgv@f088059084cb5d872e9d1a994433ca6440c2bf72 # v0.4.2
with:
toolVersion: 3.6.139
setAllVars: true
- run: |
npm install -g conventional-changelog-cli@2.2.2
conventional-changelog -p angular -u -r 1 -o "build/changelog.md"
name: 'Generate changelog.md'
- run: |
& dotnet tool update --global uno.check --version $env:UnoCheck_Version --add-source https://api.nuget.org/v3/index.json
& uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vswinworkloads --skip vsmac
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Windows-only Build
run: msbuild -r -v:m src\Uno.UI.RuntimeTests.Engine-win-only-build.slnf
- name: Build
run: |
dotnet build src\Uno.UI.RuntimeTests.Engine-dotnet-build.slnf "/t:Build;Pack" /p:PackageVersion=$env:NBGV_SemVer2 /p:Version=$env:NBGV_SemVer2 "/p:PackageOutputPath=$env:GITHUB_WORKSPACE\artifacts" "/p:PackageReleaseNotesFile=$env:GITHUB_WORKSPACE\build\changelog.md"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: NuGet
path: .\artifacts
publish:
name: Publish
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
runs-on: windows-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: NuGet
path: artifacts
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNetVersion }}
- name: Setup SignClient
run: |
dotnet tool install --tool-path build SignClient
- name: SignClient
run: |
if ("${{ secrets.SIGN_CLIENT_USER }}" -ne "")
{
build\SignClient sign -i artifacts\*.nupkg -c build\SignClient.json -r "${{ secrets.SIGN_CLIENT_USER }}" -s "${{ secrets.SIGN_CLIENT_SECRET }}" -n "Uno.UI.RuntimeTests.Engine" -d "Uno.UI.RuntimeTests.Engine" -u "https://github.com/unoplatform/uno.ui.runtimetests.engine"
}
- name: NuGet Push
run: |
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_ORG_API_KEY }}