-
-
Notifications
You must be signed in to change notification settings - Fork 78
335 lines (290 loc) · 22.5 KB
/
build.yml
File metadata and controls
335 lines (290 loc) · 22.5 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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# Author: Kang Lin<kl222@126.com>
# Workflow syntax: https://docs.github.com/actions/writing-workflows/workflow-syntax-for-github-actions
name: build
env:
artifact_path: artifact_path
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RabbitRemoteControl_VERSION: 0.1.0-dev
RabbitRemoteControl_VERSION_PRE: v0.0.37
on:
push:
pull_request:
jobs:
ubuntu:
uses: ./.github/workflows/ubuntu.yml
secrets: inherit
if: false
aarch64:
uses: ./.github/workflows/aarch64.yml
secrets: inherit
if: false
appimage:
uses: ./.github/workflows/appimage.yml
secrets: inherit
if: false
linux:
uses: ./.github/workflows/linux.yml
secrets: inherit
flatpak:
uses: ./.github/workflows/flatpak.yml
secrets: inherit
snap:
uses: ./.github/workflows/snap.yml
if: false
secrets: inherit
docker:
uses: ./.github/workflows/docker.yml
secrets: inherit
msvc:
uses: ./.github/workflows/msvc.yml
secrets: inherit
mingw:
uses: ./.github/workflows/mingw.yml
secrets: inherit
macos:
uses: ./.github/workflows/macos.yml
secrets: inherit
macos_script:
uses: ./.github/workflows/macos_script.yml
secrets: inherit
android:
uses: ./.github/workflows/android.yml
secrets: inherit
doxygen:
uses: ./.github/workflows/doxygen.yml
secrets: inherit
deploy:
#if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: [linux, docker, flatpak, msvc, doxygen, android, macos]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 1
- name: clean test tag
if: ${{ startsWith(github.ref, 'refs/heads/master') }}
continue-on-error: true
run: |
gh release delete test_${{ github.ref_name }} -y --cleanup-tag
- name: Download ubuntu
uses: actions/download-artifact@v4
if: false
with:
pattern: ${{ needs.ubuntu.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download appimage
uses: actions/download-artifact@v4
if: false
with:
pattern: ${{ needs.appimage.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download linux
uses: actions/download-artifact@v4
with:
pattern: ${{ needs.linux.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download docker
uses: actions/download-artifact@v4
with:
pattern: ${{ needs.docker.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download flatpak
uses: actions/download-artifact@v4
with:
pattern: RabbitRemoteControl_*.flatpak
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download snap
uses: actions/download-artifact@v4
if: false
with:
pattern: ${{ needs.snap.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download msvc
uses: actions/download-artifact@v4
with:
pattern: ${{ needs.msvc.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download mingw
if: false
uses: actions/download-artifact@v4
with:
name: ${{ needs.mingw.outputs.name }}
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download macos
uses: actions/download-artifact@v4
with:
pattern: ${{ needs.macos.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download android
uses: actions/download-artifact@v4
with:
pattern: ${{ needs.android.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Download doxygen
uses: actions/download-artifact@v4
with:
name: ${{ needs.doxygen.outputs.name }}
path: ${{ env.artifact_path }}
merge-multiple: true
- name: Process configure file
run: |
git clone https://github.com/KangLin/RabbitCommon.git
./RabbitCommon/Install/MergeJsonFile.sh \
"${{ github.workspace }}/update.json" \
"${{ env.artifact_path }}" "${{ env.artifact_path }}/version.json"
rm ${{ env.artifact_path }}/*.json
- name: Add change log file in Release.md file
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
if [ -f ${{github.workspace}}/Script/common.sh ]; then
source ${{github.workspace}}/Script/common.sh
content=$(<"${{github.workspace}}/ChangeLog.md")
if [[ $content =~ "${{env.RabbitRemoteControl_VERSION}}" ]]; then
echo "## :us: Change log" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
get_section ${{github.workspace}}/ChangeLog.md >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
fi
# content=$(<"${{github.workspace}}/ChangeLog_zh_CN.md")
# if [[ $content =~ "${{env.RabbitRemoteControl_VERSION}}" ]]; then
# echo "## :cn: 修改日志" >> ${{github.workspace}}/Release.md
# echo "" >> ${{github.workspace}}/Release.md
# get_section ${{github.workspace}}/ChangeLog_zh_CN.md >> ${{github.workspace}}/Release.md
# echo "" >> ${{github.workspace}}/Release.md
# fi
fi
echo "-------------------------" >> ${{github.workspace}}/Release.md
# 因为其它网站也可能需要,所以用完整的 URL
echo "|:us: English|:cn: 中文|" >> ${{github.workspace}}/Release.md
echo "| :- |:- |" >> ${{github.workspace}}/Release.md
echo "|[Change log](https://github.com/KangLin/RabbitRemoteControl/blob/v${{env.RabbitRemoteControl_VERSION}}/ChangeLog.md)|[修改日志](https://github.com/KangLin/RabbitRemoteControl/blob/v${{env.RabbitRemoteControl_VERSION}}/ChangeLog_zh_CN.md)|" >> ${{github.workspace}}/Release.md
echo "|Full Change: [${{env.RabbitRemoteControl_VERSION_PRE}}...v${{env.RabbitRemoteControl_VERSION}}](https://github.com/KangLin/RabbitRemoteControl/compare/${{env.RabbitRemoteControl_VERSION_PRE}}...v${{env.RabbitRemoteControl_VERSION}})|全部修改: [${{env.RabbitRemoteControl_VERSION_PRE}}...v${{env.RabbitRemoteControl_VERSION}}](https://github.com/KangLin/RabbitRemoteControl/compare/${{env.RabbitRemoteControl_VERSION_PRE}}...v${{env.RabbitRemoteControl_VERSION}})|" >> ${{github.workspace}}/Release.md
BUILD_TIME=`date --rfc-3339=second`
echo "|Build time: $BUILD_TIME|构建时间:$BUILD_TIME|" >> ${{github.workspace}}/Release.md
echo "|Supported platforms: [Qt5](https://doc.qt.io/qt-5/supported-platforms.html) [Qt6](https://doc.qt.io/qt-6/supported-platforms.html)|支持平台: [Qt5](https://doc.qt.io/qt-5/supported-platforms.html) [Qt6](https://doc.qt.io/qt-6/supported-platforms.html)|" >> ${{github.workspace}}/Release.md
echo "|[File checksum](https://github.com/KangLin/RabbitRemoteControl/releases/download/${{ github.ref_name }}/CheckSum.md)|[文件检验和](https://github.com/KangLin/RabbitRemoteControl/releases/download/${{ github.ref_name }}/CheckSum.md)|" >> ${{github.workspace}}/Release.md
echo "|[Online development document](https://rabbitremotecontrol.sourceforge.io/${{ github.ref_name }}/English/html/index.html)|[在线开发文档](https://rabbitremotecontrol.sourceforge.io/${{ github.ref_name }}/Chinese/html/index.html)|" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
- name: Add test comment in Release.md file
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
run: |
echo "**This release is for development and testing purposes only!**" >> ${{github.workspace}}/Release.md
if [ -f ${{github.workspace}}/Script/common.sh ]; then
source ${{github.workspace}}/Script/common.sh
content=$(<"${{github.workspace}}/ChangeLog.md")
if [[ $content =~ "${{env.RabbitRemoteControl_VERSION}}" ]]; then
echo "## :us: Change log" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
get_section ${{github.workspace}}/ChangeLog.md >> ${{github.workspace}}/Release.md
echo "-------------------------" >> ${{github.workspace}}/Release.md
fi
fi
echo "" >> ${{github.workspace}}/Release.md
echo "Commit: [${{github.sha}}](https://github.com/KangLin/RabbitRemoteControl/commit/${{github.sha}})" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
echo "Build time: `date --rfc-3339=second`" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
echo "[:us: Change log](https://github.com/KangLin/RabbitRemoteControl/blob/test_${{ github.ref_name }}/ChangeLog.md)" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
echo "[File checksum](https://github.com/KangLin/RabbitRemoteControl/releases/download/test_${{ github.ref_name }}/CheckSum.md)" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
- name: Add download
run: |
export BRANCH_NAME=${{ github.ref_name }}
if [ "${{ github.ref_name }}" == "master" ]; then
export BRANCH_NAME=test_${{ github.ref_name }}
fi
echo "## Download:" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
echo "| | x86-64 (64-bit) | x86-32 (32-bit) | AArch64 (ARM64) | ARMv7 (32-bit) |:us: Comment|:cn: 备注|" >> ${{github.workspace}}/Release.md
echo "|:- | :-------------- | :-------------- | :-------------- | :------------- |:------|---|" >> ${{github.workspace}}/Release.md
echo "|Windows|[EXE](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_win64_msvc2022_64_qt6.10.3_Setup.exe)|[EXE](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_win32_msvc2019_qt5.15.2_Setup.exe)|[EXE](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_win64_msvc2022_arm64_qt6.10.3_Setup.exe)| |Supported platforms:<br> [x86-32(Qt5)](https://doc.qt.io/qt-5/supported-platforms.html): Some features are restricted.<br> [x86-64(Qt6)](https://doc.qt.io/qt-6/supported-platforms.html)|支持平台:<br> [x86-32(Qt5)](https://doc.qt.io/qt-5/supported-platforms.html): 部分功能受限。<br> [x86-64(Qt6)](https://doc.qt.ac.cn/qt-6/supported-platforms.html)|" >> ${{github.workspace}}/Release.md
echo "|Android|[APK](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_android_x86_64_qt6.10.3_Release.apk) | |[APK](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_android_arm64_v8a_qt6.10.3_Release.apk)| |Experiment.<br> [Supported platforms](https://doc.qt.io/qt-6/supported-platforms.html)|实验性的。<br> [支持平台](https://doc.qt.io/qt-6/supported-platforms.html)|" >> ${{github.workspace}}/Release.md
echo "|Macos|[App zip](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_macos-15-intel.zip) [dmg](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_macos-15-intel.dmg)||[App zip](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_macos-14.zip) [dmg](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_macos-14.dmg)||Experiment.<br> [Supported platforms](https://doc.qt.io/qt-6/supported-platforms.html)|实验性的。<br> [支持平台](https://doc.qt.ac.cn/qt-6/supported-platforms.html)|" >> ${{github.workspace}}/Release.md
echo "|Linux|[zip file of install AppImage](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_x86_64_Setup.zip)| |[zip file of install AppImage](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_aarch64_Setup.zip)| |Unzip the zip file, then execute \`install.sh\` to install shortcuts for application, links, and directories in graphical user interfaces (GUIs), or execute \`RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_*.AppImage\` to run program in the terminal.|解压 zip 文件,然后执行 \`install.sh\`, 安装用于图形界面的目录、桌面快捷方式;或者在终端中执行 \`RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_*.AppImage\` 文件,运行程序。|" >> ${{github.workspace}}/Release.md
echo "|Ubuntu 24.04 (noble)|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu-24.04_amd64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu-24.04-arm_arm64.deb)| |Because the system library version is too low, some features are restricted.<br> Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it.|因为系统库版本太低,所以部分功能受限。<br>运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md
echo "|Ubuntu 25.04 (questing)|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu25.04_x86_64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu25.04_aarch64.deb)| | Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it. | 运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md
echo "|Ubuntu 26.04 (resolute)|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu26.04_x86_64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu26.04_aarch64.deb)| | Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it. | 运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md
echo "|Debian 12 (Bookworm)|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_debian12_x86_64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_debian12_aarch64.deb)| |Because the system library version is too low, some features are restricted.<br> Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it.|因为系统库版本太低,所以部分功能受限。<br>运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md
echo "|Debian 13 (trixie)|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_debian13_x86_64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_debian13_aarch64.deb)| |Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it. | 运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md
RPM_VERSION=${RabbitRemoteControl_VERSION//-/\_}
echo "|Fedora 43|[RPM](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol-${RPM_VERSION}-1.fc43.x86_64.rpm)| |[RPM](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol-${RPM_VERSION}-1.fc43.aarch64.rpm)| |Run \`sudo dnf install \"rpm file\"\` to install it. |执行命令 \`sudo dnf install \"rpm file\"\` 进行安装。 |" >> ${{github.workspace}}/Release.md
echo "|Fedora 42|[RPM](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol-${RPM_VERSION}-1.fc42.x86_64.rpm)| |[RPM](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol-${RPM_VERSION}-1.fc42.aarch64.rpm)| |Run \`sudo dnf install \"rpm file\"\` to install it. |执行命令 \`sudo dnf install \"rpm file\"\` 进行安装。 |" >> ${{github.workspace}}/Release.md
echo "|Fedora 41|[RPM](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol-${RPM_VERSION}-1.fc41.x86_64.rpm)| |[RPM](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol-${RPM_VERSION}-1.fc41.aarch64.rpm)| |Run \`sudo dnf install \"rpm file\"\` to install it. |执行命令 \`sudo dnf install \"rpm file\"\` 进行安装。 |" >> ${{github.workspace}}/Release.md
echo "|Flatpak|[flatpak](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_Linux_x86_64.flatpak)| |[flatpak](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_Linux_aarch64.flatpak)| |Run \`flatpak install \"flatpak File\" [--user]\` to install it.|执行命令 \`flatpak install \"flatpak File\" [--user]\` 进行安装。|" >> ${{github.workspace}}/Release.md
- name: Add snap donwload in Release.md file
run: |
export BRANCH_NAME=${{ github.ref_name }}
if [ "${{ github.ref_name }}" == "master" ]; then
export BRANCH_NAME=test_${{ github.ref_name }}
fi
echo "" >> ${{github.workspace}}/Release.md
echo "[Download development document](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_document.zip)" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
echo "[](https://flathub.org/apps/io.github.KangLin.RabbitRemoteControl)" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
echo "[](https://snapcraft.io/rabbitremotecontrol)" >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
- name: Add artifact sha256sum in Release.md file
run: |
echo "" >> ${{github.workspace}}/Release.md
echo "## File checksum:" >> ${{github.workspace}}/CheckSum.md
echo "" >> ${{github.workspace}}/CheckSum.md
echo "|File|Checksum(md5)|Checksum(sha256)|" >> ${{github.workspace}}/CheckSum.md
echo "| :- | :- |:-|" >> ${{github.workspace}}/CheckSum.md
cd ${{ env.artifact_path }}
for file in *
do
echo "$file"
if [ -f $file ]; then
if [ "${file##*.}" != "xml" ] && [ "${file##*.}" != "json" ]; then
SumMd5=`md5sum $file | awk '{print "|", $2, "|", $1, "|"}'`
Sum256=`sha256sum $file | awk '{print $1, "|"}'`
echo "${SumMd5}${Sum256}" >> ${{github.workspace}}/CheckSum.md
fi
else
rm -fr $file
fi
done
#cat ${{github.workspace}}/CheckSum.md >> ${{github.workspace}}/Release.md
echo "" >> ${{github.workspace}}/Release.md
# See: [访问有关工作流运行的上下文信息](https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context)
- name: Create Github Release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
continue-on-error: true
run: |
if [[ $RabbitRemoteControl_VERSION =~ ^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Release.md
else
gh release create ${{ github.ref_name }} --prerelease --latest=false --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Release.md
fi
- name: Upload To Github Release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/update.json ${{github.workspace}}/Release.md ${{github.workspace}}/CheckSum.md
#${{github.workspace}}/App/Client/Resource/Stats/*
- name: Upload test tag To Github Release
if: ${{ startsWith(github.ref, 'refs/heads/master') }}
run: |
gh release create test_${{ github.ref_name }} --prerelease --latest=false --title "Recently developed build - test_${{ github.ref_name }}" --notes-file ${{github.workspace}}/Release.md
gh release upload test_${{ github.ref_name }} --clobber ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/update.json ${{github.workspace}}/Release.md ${{github.workspace}}/CheckSum.md
- name: Update artifact
if: false
uses: actions/upload-artifact@v4
with:
name: Release.md
path: |
${{github.workspace}}/Release.md
${{github.workspace}}/CheckSum.md