9
9
branches : [main]
10
10
11
11
env :
12
- DotNetVersion : " 7 .0.x"
12
+ DotNetVersion : " 9 .0.x"
13
13
BuildConfiguration : " Release"
14
14
BuildParameters : " /clp:NoSummary /p:Configuration=Release /p:BuildVersion=${{ github.run_id }} /p:BuildBranch=${{ github.ref }}"
15
15
16
16
jobs :
17
17
build-windows :
18
+ strategy :
19
+ matrix :
20
+ arch : [win-x64, win-arm64]
18
21
runs-on : windows-latest
19
22
steps :
20
- - uses : actions/checkout@v2
23
+ - uses : actions/checkout@v4
21
24
22
- - uses : actions/setup-dotnet@v1
25
+ - uses : actions/setup-dotnet@v4
23
26
with :
24
27
dotnet-version : ${{ env.DotNetVersion }}
25
28
26
29
- name : Build PabloDraw
27
- run : dotnet publish Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-windows .binlog
30
+ run : dotnet publish -r:${{ matrix.arch }} Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-${{ matrix.arch }} .binlog
28
31
29
32
- name : Build PabloDraw.Console
30
- run : dotnet publish Source/PabloDraw.Console/PabloDraw.Console.cxproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw.console-windows .binlog
33
+ run : dotnet publish -r:${{ matrix.arch }} Source/PabloDraw.Console/PabloDraw.Console.cxproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw.console-${{ matrix.arch }} .binlog
31
34
32
35
- name : Build msi
33
- run : dotnet build ${{ env.BuildParameters }} Source/PabloDraw.WindowsInstaller/PabloDraw.WindowsInstaller.wixproj
36
+ run : dotnet build -r: ${{ matrix.arch }} ${{ env.BuildParameters }} /p:PublishReferences=False Source/PabloDraw.WindowsInstaller/PabloDraw.WindowsInstaller.wixproj
34
37
35
- - uses : actions/upload-artifact@v2
38
+ - uses : actions/upload-artifact@v4
36
39
with :
37
- name : pablodraw-windows- binaries-x64
38
- path : artifacts/publish/${{ env.BuildConfiguration }}/Windows /*
40
+ name : pablodraw-binaries-${{ matrix.arch }}
41
+ path : artifacts/publish/${{ env.BuildConfiguration }}/${{ matrix.arch }} /*
39
42
40
- - uses : actions/upload-artifact@v2
43
+ - uses : actions/upload-artifact@v4
41
44
with :
42
- name : pablodraw-windows- installer-x64
43
- path : artifacts/installer/${{ env.BuildConfiguration }}/Windows /*.msi
45
+ name : pablodraw-installer-${{ matrix.arch }}
46
+ path : artifacts/installer/${{ env.BuildConfiguration }}/${{ matrix.arch }} /*.msi
44
47
45
48
- name : Upload log files
46
49
if : ${{ failure() }}
47
- uses : actions/upload-artifact@v2
50
+ uses : actions/upload-artifact@v4
48
51
with :
49
- name : log
52
+ name : log-${{ matrix.arch }}
50
53
path : artifacts/log/**/*
51
54
52
55
build-linux :
56
+ strategy :
57
+ matrix :
58
+ arch : [linux-x64, linux-arm64]
53
59
runs-on : ubuntu-latest
54
60
steps :
55
- - uses : actions/checkout@v2
61
+ - uses : actions/checkout@v4
56
62
57
- - uses : actions/setup-dotnet@v1
63
+ - uses : actions/setup-dotnet@v4
58
64
with :
59
65
dotnet-version : ${{ env.DotNetVersion }}
60
66
61
67
- name : Build PabloDraw
62
- run : dotnet publish Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-linux .binlog
68
+ run : dotnet publish -r:${{ matrix.arch }} Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-${{ matrix.arch }} .binlog
63
69
64
70
- name : Create gzip
65
- run : tar -czvf pablodraw-linux-x64. tar.gz -C artifacts/publish/${{ env.BuildConfiguration }}/Linux .
71
+ run : tar -czvf pablodraw-${{ matrix.arch }}. tar.gz -C artifacts/publish/${{ env.BuildConfiguration }}/${{ matrix.arch }} .
66
72
67
- - uses : actions/upload-artifact@v2
73
+ - uses : actions/upload-artifact@v4
68
74
with :
69
- name : pablodraw-linux- binaries-x64
70
- path : pablodraw-linux-x64 .tar.gz
75
+ name : pablodraw-binaries-${{ matrix.arch }}
76
+ path : pablodraw-${{ matrix.arch }} .tar.gz
71
77
72
78
- name : Upload log files
73
79
if : ${{ failure() }}
74
- uses : actions/upload-artifact@v2
80
+ uses : actions/upload-artifact@v4
75
81
with :
76
- name : log
82
+ name : log-${{ matrix.arch }}
77
83
path : artifacts/log/**/*
78
84
79
85
build-mac :
80
- runs-on : macos-11
86
+ runs-on : macos-latest
81
87
steps :
82
- - uses : actions/checkout@v2
88
+ - uses : actions/checkout@v4
83
89
84
- - uses : actions/setup-dotnet@v1
90
+ - uses : actions/setup-dotnet@v4
85
91
with :
86
92
dotnet-version : ${{ env.DotNetVersion }}
87
93
88
94
- uses : maxim-lobanov/setup-xcode@v1
89
95
with :
90
- xcode-version : 13.1
96
+ xcode-version : latest-stable
91
97
92
98
- name : Import code signing certificate
93
99
if : github.event_name != 'pull_request'
@@ -109,16 +115,16 @@ jobs:
109
115
- name : Build PabloDraw
110
116
run : sudo dotnet build Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-mac.binlog
111
117
112
- - uses : actions/upload-artifact@v2
118
+ - uses : actions/upload-artifact@v4
113
119
with :
114
120
name : pablodraw-mac
115
121
path : artifacts/publish/${{ env.BuildConfiguration }}/Mac/*.dmg
116
122
117
123
- name : Upload log files
118
124
if : ${{ failure() }}
119
- uses : actions/upload-artifact@v2
125
+ uses : actions/upload-artifact@v4
120
126
with :
121
- name : log
127
+ name : log-mac
122
128
path : artifacts/log/**/*
123
129
124
130
update-release :
@@ -129,16 +135,10 @@ jobs:
129
135
- id : get_version
130
136
run : echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
131
137
132
- - id : get_release
133
- uses :
bruceadams/[email protected]
134
- env :
135
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
138
+ - uses : actions/download-artifact@v4
136
139
137
- - uses : actions/download-artifact@v2
138
-
139
- - uses : softprops/action-gh-release@v1
140
+ - uses : softprops/action-gh-release@v2
140
141
with :
141
- upload_url : ${{ steps.get_release.outputs.upload_url }}
142
142
files : |
143
143
**/*.msi
144
144
**/*.dmg
0 commit comments