-
Notifications
You must be signed in to change notification settings - Fork 174
109 lines (106 loc) · 3.67 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
name: Build AvaloniaILSpy
on:
push:
branches: '**'
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Run the Cake script
uses: cake-build/cake-action@v1
with:
script-path: build.cake
- name: Zip Linux x64
if: matrix.platform == 'ubuntu-latest'
run: 7z a -tzip artifacts/ILSpy-linux-x64-Release.zip artifacts/linux-x64/*
- name: Zip Linux arm64
if: matrix.platform == 'ubuntu-latest'
run: 7z a -tzip artifacts/ILSpy-linux-arm64-Release.zip artifacts/linux-arm64/*
- name: Create DMG for MacOS x64
if: matrix.platform == 'macos-latest'
run: |
brew install create-dmg
create-dmg \
--volname "ILSpy Installer" \
--volicon "artifacts/osx-x64/ILSpy.app/Contents/Resources/ILSpy.icns" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "ILSpy.app" 200 190 \
--hide-extension "ILSpy.app" \
--app-drop-link 600 185 \
"ILSpy-macos-x64-Release.dmg" \
"artifacts/osx-x64/"
- name: Create DMG for arm64
if: matrix.platform == 'macos-latest'
run: |
brew install create-dmg
create-dmg \
--volname "ILSpy Installer" \
--volicon "artifacts/osx-arm64/ILSpy.app/Contents/Resources/ILSpy.icns" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "ILSpy.app" 200 190 \
--hide-extension "ILSpy.app" \
--app-drop-link 600 185 \
"ILSpy-macos-arm64-Release.dmg" \
"artifacts/osx-arm64/"
- name: Zip Windows x64
if: matrix.platform == 'windows-latest'
run: 7z a -tzip artifacts\ILSpy-win-x64-Release.zip artifacts\win-x64\*
- name: Zip Windows arm64
if: matrix.platform == 'windows-latest'
run: 7z a -tzip artifacts\ILSpy-win-arm64-Release.zip artifacts\win-arm64\*
- name: Upload Linux x64 artifacts
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v2
with:
name: Linux x64 Release
path: artifacts/ILSpy-linux-x64-Release.zip
if-no-files-found: error
- name: Upload Linux arm64 artifacts
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v2
with:
name: Linux arm64 Release
path: artifacts/ILSpy-linux-arm64-Release.zip
if-no-files-found: error
- name: Upload macOS x64 artifacts
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: macOS x64 Release
path: ILSpy-macos-x64-Release.dmg
if-no-files-found: error
- name: Upload macOS arm64 artifacts
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: macOS arm64 Release
path: ILSpy-macos-arm64-Release.dmg
if-no-files-found: error
- name: Upload Windows x64 artifacts
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v2
with:
name: Windows x64 Release
path: artifacts/ILSpy-win-x64-Release.zip
if-no-files-found: error
- name: Upload Windows arm64 artifacts
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v2
with:
name: Windows arm64 Release
path: artifacts/ILSpy-win-arm64-Release.zip
if-no-files-found: error