-
-
Notifications
You must be signed in to change notification settings - Fork 54
275 lines (239 loc) · 8.16 KB
/
Copy pathrelease.yml
File metadata and controls
275 lines (239 loc) · 8.16 KB
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
name: "Create a release"
on:
push:
tags:
- '*'
env:
BUILD_TYPE: Release
SQLITE_VERSION: 3390100 # 3.39.1
jobs:
build-native:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.name }}
strategy:
fail-fast: false
matrix:
config:
- {
os: ubuntu-24.04, name: "Ubuntu Clang 16",
compiler: clang, compiler_version: 16,
artifact: "ubuntu-clang-16"
}
- {
os: ubuntu-24.04, name: "Ubuntu GCC 14",
compiler: gcc, compiler_version: 14,
artifact: "ubuntu-gcc-14"
}
- {
os: windows-2022, name: "Windows VS 2022",
compiler: msvc, compiler_version: 22,
artifact: "windows-msvc-22"
}
- {
os: macos-14, name: "MacOS Clang 16",
artifact: "macos-clang-16",
compiler: clang, compiler_version: 16,
}
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Setup compilers, dependencies, project and build
uses: ./.github/workflows/setup-compilers
with:
os_name: ${{ matrix.config.os }}
compiler: ${{ matrix.config.compiler }}
compiler_version: ${{ matrix.config.compiler_version }}
sanitizers: 'Off'
with_deps: true
- name: Organize files for upload
if: startsWith(matrix.config.name, 'Ubuntu') || startsWith(matrix.config.name, 'MacOS')
shell: bash
run: |
mkdir -p artifact/lib/std
cp build/arkscript artifact
cp build/bin/libArkReactor.* artifact
cp lib/*.arkm artifact/lib
cp lib/std/*.ark artifact/lib/std
rm -rf artifact/lib/std/{.git,.github,tests/__arkscript__}
- name: Organize files for upload
if: startsWith(matrix.config.name, 'Windows')
shell: bash
run: |
mkdir -p artifact/lib/std
cp build/$BUILD_TYPE/arkscript.exe artifact
cp build/$BUILD_TYPE/ArkReactor.dll artifact
cp lib/*.arkm artifact/lib
cp lib/std/*.ark artifact/lib/std
rm -rf artifact/lib/std/{.git,.github,tests/__arkscript__}
- name: Generate InnoSetup installer
if: startsWith(matrix.config.name, 'Windows')
uses: SuperFola/is-build-action@master
with:
path-to-script: 'Installer.iss'
artifact-name: 'arkscript.exe'
- name: Upload artifact
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.config.artifact }}
path: artifact
retention-days: 1
build-packages:
runs-on: ubuntu-24.04
name: ${{ matrix.config.name }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Clang 16 - deb",
generator: "DEB"
}
- {
name: "Ubuntu Clang 16 - rpm",
generator: "RPM"
}
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Setup compilers, dependencies, project and build
uses: ./.github/workflows/setup-compilers
with:
os_name: ubuntu-24.04
compiler: clang
compiler_version: 16
sanitizers: 'Off'
with_deps: false
distribute: 'On'
- name: Build package
shell: bash
run: |
cd build
cpack -G ${{ matrix.config.generator }}
ls packages
- name: Upload artifact
if: startsWith(matrix.config.generator, 'DEB')
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.config.generator }}
path: build/packages/arkscript-${{ env.RELEASE_VERSION }}.deb
retention-days: 1
- name: Upload artifact
if: startsWith(matrix.config.generator, 'RPM')
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.config.generator }}
path: build/packages/arkscript-${{ env.RELEASE_VERSION }}.rpm
retention-days: 1
release:
runs-on: ubuntu-latest
needs: [ build-native, build-packages ]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Download artifact Linux GCC 14
uses: actions/download-artifact@v6
with:
name: ubuntu-gcc-14
path: ark-ubuntu-gcc-14
- name: Download artifact Linux Clang 16
uses: actions/download-artifact@v6
with:
name: ubuntu-clang-16
path: ark-ubuntu-clang-16
- name: Download artifact Windows MSVC 19
uses: actions/download-artifact@v6
with:
name: windows-msvc-22
path: ark-windows-msvc-22
- name: Download artifact MacOS Clang
uses: actions/download-artifact@v6
with:
name: macos-clang-16
path: ark-macos-clang-16
- name: Download artifact Windows InnoSetup installer
uses: actions/download-artifact@v6
with:
name: arkscript.exe
path: ark-windows-installer
- name: Download artifact debian package
uses: actions/download-artifact@v6
with:
name: DEB
path: DEB
- name: Download artifact rpm package
uses: actions/download-artifact@v6
with:
name: RPM
path: RPM
- name: Make ZIPs
shell: bash
run: |
for i in ark-*; do
name=`echo $i | cut -c 5-`
(cd ${i} && zip -r ../${name}.zip ./)
done
mv ubuntu-gcc-14.zip linux-gcc-14.zip
mv ubuntu-clang-16.zip linux-clang-16.zip
mv ark-windows-installer/arkscript.exe windows-installer.exe
mv DEB/arkscript-${{ env.RELEASE_VERSION }}.* .
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@cae32133495112d23e3569ad04fef240ba4e7bc8 # v2.3.0
- name: Create release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ArkScript ${{ env.RELEASE_VERSION }}
tag_name: ${{ env.RELEASE_VERSION }}
draft: true
prerelease: false
body: ${{ steps.extract-release-notes.outputs.release_notes }}
files: |
linux-gcc-14.zip
linux-clang-16.zip
windows-msvc-22.zip
windows-installer.exe
macos-clang-16.zip
arkscript-${{ env.RELEASE_VERSION }}.deb
arkscript-${{ env.RELEASE_VERSION }}.rpm
publish-to-aur:
runs-on: ubuntu-latest
needs: [ release ]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Generate PKGBUILD
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DARK_BUILD_EXE=On
- name: Publish arkscript-bin AUR package
uses: KSXGitHub/github-actions-deploy-aur@084b0d9b15415bf9cdb65d44dad1efe37a354050
with:
pkgname: arkscript-bin
pkgbuild: ./build/packages/PKGBUILD-bin
updpkgsums: true
test: true
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update arkscript-bin AUR package
ssh_keyscan_types: rsa,ecdsa,ed25519
- name: Publish arkscript-src AUR package
uses: KSXGitHub/github-actions-deploy-aur@084b0d9b15415bf9cdb65d44dad1efe37a354050
with:
pkgname: arkscript-src
pkgbuild: ./build/packages/PKGBUILD-src
updpkgsums: true
test: true
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update arkscript-src AUR package
ssh_keyscan_types: rsa,ecdsa,ed25519