-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (104 loc) · 4.47 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Auto-generated by workflowgen.ts
# Do not edit manually.
name: build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
# Build win-x64
- name: Build win-x64
if: matrix.platform == 'windows-latest'
run: dotnet publish --configuration Release --self-contained -p:PublishSingleFile=true -r win-x64
#- name: ZIP win-x64
# if: matrix.platform == 'windows-latest'
# run: 7z a -tzip artifacts/efmig-win-x64-Release.zip ./Efmig/bin/Release/net8.0/win-x64/publish/*
- name: Upload win-x64 artifacts
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: efmig-win-x64-Release
path: Efmig/bin/Release/net8.0/win-x64/publish/
if-no-files-found: error
# Build win-arm64
- name: Build win-arm64
if: matrix.platform == 'windows-latest'
run: dotnet publish --configuration Release --self-contained -p:PublishSingleFile=true -r win-arm64
#- name: ZIP win-arm64
# if: matrix.platform == 'windows-latest'
# run: 7z a -tzip artifacts/efmig-win-arm64-Release.zip ./Efmig/bin/Release/net8.0/win-arm64/publish/*
- name: Upload win-arm64 artifacts
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: efmig-win-arm64-Release
path: Efmig/bin/Release/net8.0/win-arm64/publish/
if-no-files-found: error
# Build linux-x64
- name: Build linux-x64
if: matrix.platform == 'ubuntu-latest'
run: dotnet publish --configuration Release --self-contained -p:PublishSingleFile=true -r linux-x64
#- name: ZIP linux-x64
# if: matrix.platform == 'ubuntu-latest'
# run: 7z a -tzip artifacts/efmig-linux-x64-Release.zip ./Efmig/bin/Release/net8.0/linux-x64/publish/*
- name: Upload linux-x64 artifacts
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: efmig-linux-x64-Release
path: Efmig/bin/Release/net8.0/linux-x64/publish/
if-no-files-found: error
# Build linux-arm64
- name: Build linux-arm64
if: matrix.platform == 'ubuntu-latest'
run: dotnet publish --configuration Release --self-contained -p:PublishSingleFile=true -r linux-arm64
#- name: ZIP linux-arm64
# if: matrix.platform == 'ubuntu-latest'
# run: 7z a -tzip artifacts/efmig-linux-arm64-Release.zip ./Efmig/bin/Release/net8.0/linux-arm64/publish/*
- name: Upload linux-arm64 artifacts
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: efmig-linux-arm64-Release
path: Efmig/bin/Release/net8.0/linux-arm64/publish/
if-no-files-found: error
# Build osx-x64
- name: Build osx-x64
if: matrix.platform == 'macos-latest'
run: dotnet publish --configuration Release --self-contained -p:PublishSingleFile=true -r osx-x64
#- name: ZIP osx-x64
# if: matrix.platform == 'macos-latest'
# run: 7z a -tzip artifacts/efmig-osx-x64-Release.zip ./Efmig/bin/Release/net8.0/osx-x64/publish/*
- name: Upload osx-x64 artifacts
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: efmig-osx-x64-Release
path: Efmig/bin/Release/net8.0/osx-x64/publish/
if-no-files-found: error
# Build osx-arm64
- name: Build osx-arm64
if: matrix.platform == 'macos-latest'
run: dotnet publish --configuration Release --self-contained -p:PublishSingleFile=true -r osx-arm64
#- name: ZIP osx-arm64
# if: matrix.platform == 'macos-latest'
# run: 7z a -tzip artifacts/efmig-osx-arm64-Release.zip ./Efmig/bin/Release/net8.0/osx-arm64/publish/*
- name: Upload osx-arm64 artifacts
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: efmig-osx-arm64-Release
path: Efmig/bin/Release/net8.0/osx-arm64/publish/
if-no-files-found: error