-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (47 loc) · 1.55 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
name: build
on:
push:
paths:
- 'Image2Display/**'
- '.github/workflows/build.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux-arm,linux-x64,win-x86,win-x64,win-arm,osx-x64
dotnetos: [linux, win, osx]
dotnetarch: [x86, x64, arm, arm64]
exclude:
- dotnetos: linux
dotnetarch: x86
- dotnetos: osx
dotnetarch: x86
- dotnetos: osx
dotnetarch: arm
- dotnetos: win
dotnetarch: arm
fail-fast: true
steps:
- uses: actions/checkout@v4
- name: environment prepare
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y dotnet-sdk-8.0
sudo apt-get install -y p7zip-full
- name: build
env:
DOTNETOS: ${{ matrix.dotnetos }}
DOTNETARCH: ${{ matrix.dotnetarch }}
run: |
cd Image2Display/Image2Display
dotnet publish -r $DOTNETOS-$DOTNETARCH --configuration Release -p:PublishSingleFile=true -p:IncludeNativeLibrariesFromSelfExtract=true --self-contained true -p:PublishTrimmed=true -p:TrimMode=link
mkdir pkg
mv bin/Release/net8.0/$DOTNETOS-$DOTNETARCH/publish/* pkg/
- uses: actions/upload-artifact@v4
with:
name: Image2Display-${{ matrix.dotnetos }}-${{ matrix.dotnetarch }}
path: Image2Display/Image2Display/pkg/