-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (59 loc) · 2.16 KB
/
win-release.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
name: Windows Release
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'CrossBrowser.Test/**'
env:
DOTNET_VERSION: '6.0.x'
WPF_PROJECT_PATH: CrossBrowser.WPF/CrossBrowser.WPF.csproj
AVALONIA_PROJECT_PATH: CrossBrowser.Avalonia/CrossBrowser.Avalonia.csproj
jobs:
windows-release:
permissions:
contents: write
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install WPF dependencies
run: dotnet restore ${{ env.WPF_PROJECT_PATH}}
- name: Build WPF
run: dotnet build ${{ env.WPF_PROJECT_PATH}} -c Release --no-restore
# TODO: sign package before publishing
- name: Publish WPF
run: dotnet publish ${{ env.WPF_PROJECT_PATH}} -c Release --self-contained -p:PublishSingleFile=true
env:
# TODO: support other RuntimeIdentifiers
RuntimeIdentifier: win-x64
- name: Install Avalonia Windows dependencies
run: dotnet restore ${{ env.AVALONIA_PROJECT_PATH}} -p:Configuration=Avalonia-Win-Release
- name: Build Avalonia Windows
run: dotnet build ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release --no-restore
# TODO: sign package before publishing
- name: Publish Avalonia Windows
run: dotnet publish ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release
env:
# TODO: support other RuntimeIdentifiers
RuntimeIdentifier: win-x64
- name: 'Update version'
id: version
uses: "paulhatch/semantic-version@v5.0.2"
with:
tag_prefix: "v"
version_format: "v${major}.${minor}.${increment}"
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.version.outputs.version }}
prerelease : false
makeLatest: true
name: ${{ steps.version.outputs.version }}
artifacts: "**/CrossBrowser.Avalonia.exe,**/CrossBrowser.WPF.exe"