Skip to content

Commit 9001314

Browse files
committed
Test workflow changes
1 parent 50f298e commit 9001314

File tree

4 files changed

+75
-84
lines changed

4 files changed

+75
-84
lines changed
Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,23 @@
1-
name: Avalonia Windows build and publish
1+
name: Avalonia Windows build
22

33
on:
44
push:
55
branches: [ main ]
66
paths-ignore:
77
- '**.md'
8-
- 'CrossBrowser.WPF/**'
9-
- '*/CrossBrowser.Native.macOSX/**'
108
- 'CrossBrowser.Test/**'
119
pull_request:
1210
branches: [ main ]
1311
paths-ignore:
1412
- '**.md'
15-
- 'CrossBrowser.WPF/**'
16-
- '*/CrossBrowser.Native.macOSX/**'
1713
- 'CrossBrowser.Test/**'
1814

1915
env:
2016
DOTNET_VERSION: '6.0.405'
2117
AVALONIA_PROJECT_PATH: CrossBrowser.Avalonia/CrossBrowser.Avalonia.csproj
2218

2319
jobs:
24-
avalonia-win-build-publish:
25-
permissions:
26-
contents: write
27-
20+
avalonia-win-build:
2821
runs-on: windows-latest
2922

3023
steps:
@@ -40,16 +33,4 @@ jobs:
4033
run: dotnet restore ${{ env.AVALONIA_PROJECT_PATH}} -p:Configuration=Avalonia-Win-Release
4134

4235
- name: Build Avalonia Windows
43-
run: dotnet build ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release --no-restore
44-
45-
# TODO: sign package before publishing
46-
- name: Publish Avalonia Windows
47-
run: dotnet publish ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release
48-
env:
49-
# TODO: support other RuntimeIdentifiers
50-
RuntimeIdentifier: win-x64
51-
52-
- name: Upload installer
53-
uses: actions/upload-artifact@v3
54-
with:
55-
path: CrossBrowser.Avalonia/bin/Avalonia-Win-Release/win-x64/publish/CrossBrowser.Avalonia.exe
36+
run: dotnet build ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release --no-restore

.github/workflows/release.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/win-release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Windows Release
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths-ignore:
7+
- '**.md'
8+
- 'CrossBrowser.Test/**'
9+
pull_request:
10+
branches: [ main ]
11+
paths-ignore:
12+
- '**.md'
13+
- 'CrossBrowser.Test/**'
14+
15+
env:
16+
DOTNET_VERSION: '6.0.405'
17+
WPF_PROJECT_PATH: CrossBrowser.WPF/CrossBrowser.WPF.csproj
18+
19+
jobs:
20+
wpf-build-publish:
21+
permissions:
22+
contents: write
23+
24+
runs-on: windows-latest
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v3
29+
30+
- name: Setup .NET
31+
uses: actions/setup-dotnet@v3
32+
with:
33+
dotnet-version: ${{ env.DOTNET_VERSION }}
34+
35+
- name: Install WPF dependencies
36+
run: dotnet restore ${{ env.WPF_PROJECT_PATH}}
37+
38+
- name: Build WPF
39+
run: dotnet build ${{ env.WPF_PROJECT_PATH}} -c Release --no-restore
40+
41+
# TODO: sign package before publishing
42+
- name: Publish WPF
43+
run: dotnet publish ${{ env.WPF_PROJECT_PATH}} -c Release --self-contained -p:PublishSingleFile=true
44+
env:
45+
# TODO: support other RuntimeIdentifiers
46+
RuntimeIdentifier: win-x64
47+
48+
- name: Install Avalonia Windows dependencies
49+
run: dotnet restore ${{ env.AVALONIA_PROJECT_PATH}} -p:Configuration=Avalonia-Win-Release
50+
51+
- name: Build Avalonia Windows
52+
run: dotnet build ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release --no-restore
53+
54+
# TODO: sign package before publishing
55+
- name: Publish Avalonia Windows
56+
run: dotnet publish ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release
57+
env:
58+
# TODO: support other RuntimeIdentifiers
59+
RuntimeIdentifier: win-x64
60+
61+
- name: Create Release
62+
uses: ncipollo/release-action@v1
63+
with:
64+
tag: v0.0.${{ github.run_number }}
65+
prerelease : github.ref_name != 'main'
66+
makeLatest: github.ref_name == 'main'
67+
release_name: ${{ ( github.event_name == 'pull_request' && 'Pre-release' ) || 'Release' }} v0.0.${{ github.run_number }}
68+
artifacts: "**.exe"
Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1-
name: WPF build and publish
1+
name: WPF build
22

33
on:
44
push:
55
branches: [ main ]
66
paths-ignore:
77
- '**.md'
8-
- 'CrossBrowser.Avalonia/**'
9-
- 'CrossBrowser.Native/**'
108
- 'CrossBrowser.Test/**'
119
pull_request:
1210
branches: [ main ]
1311
paths-ignore:
1412
- '**.md'
15-
- 'CrossBrowser.Avalonia/**'
16-
- 'CrossBrowser.Native/**'
1713
- 'CrossBrowser.Test/**'
1814

1915
env:
2016
DOTNET_VERSION: '6.0.405'
2117
WPF_PROJECT_PATH: CrossBrowser.WPF/CrossBrowser.WPF.csproj
18+
AVALONIA_PROJECT_PATH: CrossBrowser.Avalonia/CrossBrowser.Avalonia.csproj
2219

2320
jobs:
24-
wpf-build-publish:
25-
permissions:
26-
contents: write
27-
21+
wpf-build:
2822
runs-on: windows-latest
2923

3024
steps:
@@ -40,15 +34,4 @@ jobs:
4034
run: dotnet restore ${{ env.WPF_PROJECT_PATH}}
4135

4236
- name: Build WPF
43-
run: dotnet build ${{ env.WPF_PROJECT_PATH}} -c Release --no-restore
44-
45-
# TODO: sign package before publishing
46-
- name: Publish WPF
47-
run: dotnet publish ${{ env.WPF_PROJECT_PATH}} -c Release --self-contained -p:PublishSingleFile=true
48-
env:
49-
# TODO: support other RuntimeIdentifiers
50-
RuntimeIdentifier: win-x64
51-
- name: Upload installer
52-
uses: actions/upload-artifact@v3
53-
with:
54-
path: CrossBrowser.WPF/bin/Release/net6.0-windows/win-x64/publish/CrossBrowser.WPF.exe
37+
run: dotnet build ${{ env.WPF_PROJECT_PATH}} -c Release --no-restore

0 commit comments

Comments
 (0)