-
Notifications
You must be signed in to change notification settings - Fork 9
198 lines (166 loc) Β· 8.39 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
name: Build and Package
on:
push:
branches:
- main
jobs:
build-macos:
runs-on: macos-latest
steps:
- name: π | Checkout repository
uses: actions/checkout@v2
- name: π | Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0.x'
- name: ποΈ | Build and publish for macOS (x64)
run: |
cd SkEditor
dotnet restore
dotnet publish -c Release -r osx-x64 -p:PublishSingleFile=true --no-self-contained --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly /p:DebugType=None /p:DebugSymbols=false
- name: π οΈ | Create .app structure
run: |
mkdir -p "SkEditor.app/Contents/MacOS"
mkdir -p "SkEditor.app/Contents/Resources"
cp -r SkEditor/bin/Release/net8.0/osx-x64/publish/* "SkEditor.app/Contents/MacOS/"
cp SkEditor/Info.plist "SkEditor.app/Contents/"
cp SkEditor/SkEditor.icns "SkEditor.app/Contents/Resources/"
- name: π | Set execute permissions
run: |
find SkEditor.app/Contents/MacOS/ -type f -exec chmod +x {} \;
- name: π¦ | Zip .app package
run: |
zip -r SkEditorMac.zip SkEditor.app
- name: π€ | Upload artifacts
uses: actions/upload-artifact@v2
with:
name: SkEditorMac
path: SkEditorMac.zip
# now build osx-arm64
- name: ποΈ | Build and publish for macOS (arm64)
run: |
cd SkEditor
dotnet restore
dotnet publish -c Release -r osx-arm64 -p:PublishSingleFile=true --no-self-contained --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly /p:DebugType=None /p:DebugSymbols=false
- name: π οΈ | Create .app structure (arm64)
run: |
mkdir -p "SkEditor.app/Contents/MacOS"
mkdir -p "SkEditor.app/Contents/Resources"
cp -r SkEditor/bin/Release/net8.0/osx-arm64/publish/* "SkEditor.app/Contents/MacOS/"
cp SkEditor/Info.plist "SkEditor.app/Contents/"
cp SkEditor/SkEditor.icns "SkEditor.app/Contents/Resources/"
- name: π | Set execute permissions (arm64)
run: |
find SkEditor.app/Contents/MacOS/ -type f -exec chmod +x {} \;
- name: π¦ | Zip .app package (arm64)
run: |
zip -r SkEditorMac-arm64.zip SkEditor.app
- name: π€ | Upload artifacts (arm64)
uses: actions/upload-artifact@v2
with:
name: SkEditorMac-arm64
path: SkEditorMac-arm64.zip
build-linux-debian-arm64:
runs-on: ubuntu-latest
steps:
- name: π | Checkout repository
uses: actions/checkout@v2
- name: π | Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0.x'
- name: ποΈ | Build and publish for Debian
run: |
cd SkEditor
dotnet restore
dotnet publish -c Release -r linux-arm64 -p:PublishSingleFile=true --no-self-contained --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly /p:DebugType=None /p:DebugSymbols=false
- name: π | Install Dependencies
run: |
sudo apt update
sudo apt install wget curl -y
- name: π οΈ | Create .deb structure
run: |
mkdir -p "SkEditorFiles/opt/SkEditor"
cp -r SkEditor/bin/Release/net8.0/linux-arm64/publish/* "SkEditorFiles/opt/SkEditor/"
mkdir -p "SkEditorFiles/usr/share/applications"
cd SkEditorFiles/usr/share/applications
wget -O SkEditor.desktop -r 'https://www.dropbox.com/scl/fi/vy8j6uil0aj1k3mhjbq1n/SkEditor.desktop?rlkey=xhvi3ay35g1afox23pgvu0ht4&dl=1'
wget -O /home/runner/work/SkEditor/SkEditor/SkEditorFiles/opt/SkEditor/SkEditor.png https://raw.githubusercontent.com/SkEditorTeam/SkEditor/main/SkEditor.png
mkdir -p "/home/runner/work/SkEditor/SkEditor/SkEditorFiles/DEBIAN"
cd /home/runner/work/SkEditor/SkEditor/SkEditorFiles/DEBIAN
pwd
wget -O control -r 'https://www.dropbox.com/scl/fi/tep20aykrghy2aamc1m77/control-arm64?rlkey=bhfztntq2tzzbtiv3xv9oea6j&dl=1'
echo "exported_ver=\$(curl -s \"https://camo.githubusercontent.com/024e74589d307c8cbe664b87c58cf65e2b62587aec02459d998719874ea7b5eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f536b456469746f725465616d2f536b456469746f723f636f6c6f723d253233376133346562266c6162656c3d76657273696f6e267374796c653d666c61742d737175617265\" | grep -oP '(?<=<title>).*?(?=</title>)' | sed 's/v\([0-9]\)/\1/') && exported_ver=\"\${exported_ver^}\"" >> getver
echo "echo \"\$exported_ver\" >> control" >> getver
bash getver
rm -f getver
echo "Maintainer: Notro" >> control
wget -O postrm -r 'https://www.dropbox.com/scl/fi/qni5y6fahxrz80ttenct5/postrm?rlkey=zn88axbghrwxokxtx1i5hhbgr&dl=1'
wget -O preinst -r 'https://www.dropbox.com/scl/fi/d3v6523n16ndetbg7x5yh/preinst?rlkey=xfrk7go1gxl8zhwt0cswrihjo&st=rwyq4bpo&dl=1'
wget -O postinst -r 'https://www.dropbox.com/scl/fi/9g1zkrut89cnxr0628g7t/postinst?rlkey=puohu1xktrub2txj9l0t1q9dc&st=q5ykofhe&dl=1'
- name: π | Fix Permissions
run: |
cd /home/runner/work/SkEditor/SkEditor/SkEditorFiles/DEBIAN
chmod 0755 *
- name: π¦ | Create .deb package
run: |
cd /home/runner/work/SkEditor/SkEditor/
pwd
dpkg-deb -b SkEditorFiles SkEditor-arm64.deb
- name: π€ | Upload artifacts
uses: actions/upload-artifact@v2
with:
name: SkEditorLinuxDebian (arm64)
path: SkEditor-arm64.deb
build-linux-debian-x64:
runs-on: ubuntu-latest
steps:
- name: π | Checkout repository
uses: actions/checkout@v2
- name: π | Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0.x'
- name: ποΈ | Build and publish for Debian
run: |
cd SkEditor
dotnet restore
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --no-self-contained /p:DebugType=None /p:DebugSymbols=false
- name: π | Install Dependencies
run: |
sudo apt update
sudo apt install wget curl -y
- name: π οΈ | Create .deb structure
run: |
mkdir -p "SkEditorFilesx/opt/SkEditor"
cp -r SkEditor/bin/Release/net8.0/linux-x64/publish/* "SkEditorFilesx/opt/SkEditor/"
mkdir -p "SkEditorFilesx/usr/share/applications"
cd SkEditorFilesx/usr/share/applications
wget -O SkEditor.desktop -r 'https://www.dropbox.com/scl/fi/vy8j6uil0aj1k3mhjbq1n/SkEditor.desktop?rlkey=xhvi3ay35g1afox23pgvu0ht4&dl=1'
wget -O /home/runner/work/SkEditor/SkEditor/SkEditorFilesx/opt/SkEditor/SkEditor.png https://raw.githubusercontent.com/SkEditorTeam/SkEditor/main/SkEditor.png
mkdir -p "/home/runner/work/SkEditor/SkEditor/SkEditorFilesx/DEBIAN"
cd /home/runner/work/SkEditor/SkEditor/SkEditorFilesx/DEBIAN
pwd
wget -O control -r 'https://www.dropbox.com/scl/fi/tep20aykrghy2aamc1m77/control-arm64?rlkey=bhfztntq2tzzbtiv3xv9oea6j&dl=1'
echo "exported_ver=\$(curl -s \"https://camo.githubusercontent.com/024e74589d307c8cbe664b87c58cf65e2b62587aec02459d998719874ea7b5eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f536b456469746f725465616d2f536b456469746f723f636f6c6f723d253233376133346562266c6162656c3d76657273696f6e267374796c653d666c61742d737175617265\" | grep -oP '(?<=<title>).*?(?=</title>)' | sed 's/v\([0-9]\)/\1/') && exported_ver=\"\${exported_ver^}\"" >> getver
echo "echo \"\$exported_ver\" >> control" >> getver
bash getver
rm -f getver
echo "Maintainer: Notro" >> control
wget -O postrm -r 'https://www.dropbox.com/scl/fi/qni5y6fahxrz80ttenct5/postrm?rlkey=zn88axbghrwxokxtx1i5hhbgr&dl=1'
wget -O preinst -r 'https://www.dropbox.com/scl/fi/d3v6523n16ndetbg7x5yh/preinst?rlkey=xfrk7go1gxl8zhwt0cswrihjo&st=rwyq4bpo&dl=1'
wget -O postinst -r 'https://www.dropbox.com/scl/fi/9g1zkrut89cnxr0628g7t/postinst?rlkey=puohu1xktrub2txj9l0t1q9dc&st=q5ykofhe&dl=1'
- name: π | Fix Permissions
run: |
cd /home/runner/work/SkEditor/SkEditor/SkEditorFilesx/DEBIAN
chmod 0755 *
- name: π¦ | Create .deb package
run: |
cd /home/runner/work/SkEditor/SkEditor/
pwd
dpkg-deb -b SkEditorFilesx SkEditor-x64.deb
- name: π€ | Upload artifacts
uses: actions/upload-artifact@v2
with:
name: SkEditorLinuxDebian (x64)
path: SkEditor-x64.deb