-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (69 loc) · 2.11 KB
/
build.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
name: build
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.head.sha || github.sha }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch: [arm64,x64,x86]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build Hash
run: dotnet publish src\Hash.Wpf -p:PublishProfile=win-${{ matrix.arch }}
- name: Build MSI
run: dotnet build src\WixInstallerSetup --arch ${{ matrix.arch }} --no-dependencies #--output src\WixInstallerSetup\bin\${{ matrix.arch }}\Release -p:Platform=${{ matrix.arch }}
env:
Configuration: Release
Platform: ${{ matrix.arch }}
OutputPath: bin\${{ matrix.arch }}\Release
- run: tree /F
- name: Copy build artifacts
run: |
mkdir artifact
copy src\Hash.Wpf\publish\win-${{ matrix.arch }}\HashCalculator.exe artifact\
copy src\WixInstallerSetup\bin\${{ matrix.arch }}\Release\ja-jp\HashCalculator-Setup.msi artifact\
- run: tree /F
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: win-${{ matrix.arch }}
path: artifact\
build-portable:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build Hash
run: dotnet build src\Hash.Wpf #-v diag -c Release -p:Platform="Any CPU" -o src\Hash.Wpf\bin\Release
env:
Configuration: Release
Platform: Any CPU
OutputPath: bin\Release
- run: tree /F
- name: Copy build artifacts
run: |
mkdir artifact
xcopy src\Hash.Wpf\bin\Release\ artifact\ /e
del artifact\*.pdb
- run: tree /F
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: win-anycpu-portable
path: artifact\