-
-
Notifications
You must be signed in to change notification settings - Fork 14
99 lines (81 loc) · 2.93 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
# Author: Kang Lin<[email protected]>
name: build
env:
artifact_path: artifact_path
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RabbitCommon_VERSION: v1.0.13
on:
push:
pull_request:
jobs:
ubuntu:
uses: ./.github/workflows/ubuntu.yml
msvc:
uses: ./.github/workflows/msvc.yml
mingw:
uses: ./.github/workflows/mingw.yml
macos:
uses: ./.github/workflows/macos.yml
android:
uses: ./.github/workflows/android.yml
doxygen:
uses: ./.github/workflows/doxygen.yml
if: ${{ startsWith(github.ref, 'refs/tags/') }}
deploy:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: [ubuntu, mingw, msvc, macos, android, doxygen]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: false
- name: Download ubuntu
uses: actions/download-artifact@v3
with:
name: ${{ needs.ubuntu.outputs.name }}
path: ${{ env.artifact_path }}
- name: Download msvc
uses: actions/download-artifact@v3
with:
name: ${{ needs.msvc.outputs.name }}
path: ${{ env.artifact_path }}
- name: Download mingw
uses: actions/download-artifact@v3
with:
name: ${{ needs.mingw.outputs.name }}
path: ${{ env.artifact_path }}
- name: Download macos
uses: actions/download-artifact@v3
with:
name: ${{ needs.macos.outputs.name }}
path: ${{ env.artifact_path }}
- name: Download android
uses: actions/download-artifact@v3
with:
name: ${{ needs.android.outputs.name }}
path: ${{ env.artifact_path }}
- name: Download doxygen
uses: actions/download-artifact@v3
with:
name: ${{ needs.doxygen.outputs.name }}
path: ${{ env.artifact_path }}
- name: Make Note.md file
run: |
cd ${{ env.artifact_path }}
echo "[:cn: 修改日志](https://github.com/KangLin/RabbitCommon/blob/${{env.RabbitCommon_VERSION}}/ChangeLog_zh_CN.md) [:us: Change log](https://github.com/KangLin/RabbitCommon/blob/${{env.RabbitCommon_VERSION}}/ChangeLog.md)" > ${{github.workspace}}/Note.md
echo "" >> ${{github.workspace}}/Note.md
echo "File checksum:" >> ${{github.workspace}}/Note.md
for file in *
do
echo "$file"
if [ -f "$file" ] && [ "${file##*.}" != "xml" ]; then
md5sum $file > $file.md5sum
cat $file.md5sum >> ${{github.workspace}}/Note.md
fi
done
- name: Upload To Github Release
#if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Note.md
gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md