22name : Build Client
33
44# Workflow's trigger
5- # 在创建标签的时候打包
5+ # Pack when creating tags
66on :
77 push :
88 tags :
99 - v*
1010
1111# Workflow's jobs
12- # 一共需要3台电脑运行
12+ # A total of 3 computers are required to run
1313# windows
1414# macos-latest x86_64
1515# macos-latest arm64
@@ -31,21 +31,21 @@ jobs:
3131 - name : Check out git repository
3232 uses : actions/checkout@main
3333
34- # 获取版本号 workflow不支持 所以用插件
34+ # Obtaining the version number is not supported by workflow, so a plug-in is used.
3535 - name : Create version
3636 id : chat2db_version
3737 uses : bhowell2/github-substring-action@1.0.1
3838 with :
3939 value : ${{ github.ref }}
4040 index_of_str : " refs/tags/v"
4141
42- # 输出基础信息
42+ # Output basic information
4343 - name : Print basic information
4444 run : |
4545 echo "current environment: ${{ env.CHAT2DB_ENVIRONMENT }}"
4646 echo "current version: ${{ steps.chat2db_version.outputs.substring }}"
4747
48- # 安装jre Windows
48+ # Install jre Windows
4949 - name : Install Jre for Windows
5050 if : ${{ runner.os == 'Windows' }}
5151 uses : actions/setup-java@main
5454 distribution : " temurin"
5555 java-package : " jre"
5656
57- # 安装jre MacOS X64
57+ # Install jre MacOS X64
5858 - name : Install Jre MacOS X64
5959 if : ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }}
6060 uses : actions/setup-java@main
6363 distribution : " temurin"
6464 java-package : " jre"
6565
66- # 安装jre MacOS arm64
66+ # Install jre MacOS arm64
6767 - name : Install Jre MacOS arm64
6868 if : ${{ runner.os == 'macOS' && matrix.arch == 'arm64' }}
6969 uses : actions/setup-java@main
7373 java-package : " jre"
7474 architecture : " aarch64"
7575
76- # 安装jre Linux
76+ # Install jre Linux
7777 - name : Install Jre for Linux
7878 if : ${{ runner.os == 'Linux' }}
7979 uses : actions/setup-java@main
@@ -82,58 +82,58 @@ jobs:
8282 distribution : " temurin"
8383 java-package : " jre"
8484
85- # java.security 开放tls1 Windows
85+ # java.security open tls1 Windows
8686 - name : Enable tls1
8787 if : ${{ runner.os == 'Windows' }}
8888 run : |
8989 sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "${{ env.JAVA_HOME }}/conf/security/java.security"
9090
91- # java.security 开放tls1 macOS
91+ # java.security open tls1 macOS
9292 - name : Enable tls1
9393 if : ${{ runner.os == 'macOS' }}
9494 run : |
9595 sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" $JAVA_HOME/conf/security/java.security
9696
97- # 复制jre Windows
97+ # Copy jre Windows
9898 - name : Copy Jre for Windows
9999 if : ${{ runner.os == 'Windows' }}
100100 run : |
101101 mkdir chat2db-client/static
102102 cp -r "${{ env.JAVA_HOME }}" chat2db-client/static/jre
103103
104- # 复制jre macOS
104+ # Copy jre macOS
105105 - name : Copy Jre for macOS
106106 if : ${{ runner.os == 'macOS' }}
107107 run : |
108108 mkdir chat2db-client/static
109109 cp -r $JAVA_HOME chat2db-client/static/jre
110110 chmod -R 777 chat2db-client/static/jre/
111111
112- # 复制jre Linux
112+ # Copy jre Linux
113113 - name : Copy Jre for Linux
114114 if : ${{ runner.os == 'Linux' }}
115115 run : |
116116 mkdir chat2db-client/static
117117 cp -r $JAVA_HOME chat2db-client/static/jre
118118 chmod -R 777 chat2db-client/static/jre/
119119
120- # 安装node
120+ # Install node
121121 - name : Install Node.js
122122 uses : actions/setup-node@main
123123 with :
124124 node-version : 16
125125 cache : " yarn"
126126 cache-dependency-path : chat2db-client/yarn.lock
127127
128- # 安装java
128+ # Install java
129129 - name : Install Java and Maven
130130 uses : actions/setup-java@main
131131 with :
132132 java-version : " 17"
133133 distribution : " temurin"
134134 cache : " maven"
135135
136- # 构建静态文件信息
136+ # Build static file information
137137 - name : Yarn install & build & copy
138138 run : |
139139 cd chat2db-client
@@ -145,7 +145,7 @@ jobs:
145145 yarn
146146 yarn run build
147147
148- # 编译服务端java版本
148+ # Compile server-side java version
149149 - name : Build Java
150150 run : mvn clean package -B '-Dmaven.test.skip=true' -f chat2db-server/pom.xml
151151
@@ -160,7 +160,7 @@ jobs:
160160 echo -n ${{ steps.chat2db_version.outputs.substring }} > version
161161 cp -r version ./versions/
162162
163- # 复制服务端java 到指定位置
163+ # Copy server-side java to the specified location
164164 - name : Copy App
165165 run : |
166166 cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/${{ steps.chat2db_version.outputs.substring }}/static/
@@ -245,14 +245,14 @@ jobs:
245245 args : " -c.extraMetadata.version=${{ steps.chat2db_version.outputs.substring }} --linux"
246246 release : true
247247
248- # 准备要需要的数据 Windows
248+ # Prepare the required data Windows
249249 - name : Prepare upload for Windows
250250 if : runner.os == 'Windows'
251251 run : |
252252 mkdir oss_temp_file
253253 cp -r chat2db-client/release/*Setup*.exe ./oss_temp_file
254254
255- # 准备要需要的数据 MacOS x86_64
255+ # Prepare the required data MacOS x86_64
256256 - name : Prepare upload for MacOS x86_64
257257 if : ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }}
258258 run : |
@@ -265,21 +265,21 @@ jobs:
265265 cd static/ && zip -r chat2db-server-start.zip ./
266266 cp -r chat2db-server-start.zip ../../../../oss_temp_file
267267
268- # 准备要需要的数据 MacOS arm64
268+ # Prepare the required data MacOS arm64
269269 - name : Prepare upload for MacOS arm64
270270 if : ${{ runner.os == 'macOS' && matrix.arch == 'arm64' }}
271271 run : |
272272 mkdir oss_temp_file
273273 cp -r chat2db-client/release/*.dmg ./oss_temp_file
274274
275- # 准备要需要的数据 Linux
275+ # Prepare the required data Linux
276276 - name : Prepare upload for Linux
277277 if : runner.os == 'Linux'
278278 run : |
279279 mkdir oss_temp_file
280280 cp -r chat2db-client/release/*.AppImage ./oss_temp_file
281281
282- # 把文件上传到OSS 方便下载
282+ # Upload files to OSS for easy downloading
283283 - name : Set up oss utils
284284 uses : yizhoumo/setup-ossutil@v1
285285 with :
@@ -291,7 +291,7 @@ jobs:
291291 run : |
292292 ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/release/${{ steps.chat2db_version.outputs.substring }}/
293293
294- # 构建完成通知
294+ # Build completion notification
295295 - name : Send dingtalk message for Windows
296296 if : ${{ runner.os == 'Windows' }}
297297 uses : ghostoy/dingtalk-action@master
@@ -304,7 +304,7 @@ jobs:
304304 "text": "# Windows-release-打包完成通知 \n  \n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }}) \n ### Windows下载地址:[https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB%20Setup%20${{ steps.chat2db_version.outputs.substring }}.exe](https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB%20Setup%20${{ steps.chat2db_version.outputs.substring }}.exe) "
305305 }
306306
307- # 构建完成通知
307+ # Build completion notification
308308 - name : Send dingtalk message for MacOS x86_64
309309 if : ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }}
310310 uses : ghostoy/dingtalk-action@master
@@ -317,7 +317,7 @@ jobs:
317317 "text": "# MacOS-x86_64-release-打包完成通知 \n  \n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }}) \n ### Intel芯片下载地址:[https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB-${{ steps.chat2db_version.outputs.substring }}.dmg](https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB-${{ steps.chat2db_version.outputs.substring }}.dmg) \n ### jar包下载地址:[https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/chat2db-server-start.zip](https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/chat2db-server-start.zip) "
318318 }
319319
320- # 构建完成通知
320+ # Build completion notification
321321 - name : Send dingtalk message for MacOS arm64
322322 if : ${{ runner.os == 'macOS' && matrix.arch == 'arm64' }}
323323 uses : ghostoy/dingtalk-action@master
@@ -330,7 +330,7 @@ jobs:
330330 "text": "# MacOS-arm64-release-打包完成通知 \n  \n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }}) \n ### Apple芯片下载地址:[https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB-${{ steps.chat2db_version.outputs.substring }}-arm64.dmg](https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB-${{ steps.chat2db_version.outputs.substring }}-arm64.dmg) "
331331 }
332332
333- # 构建完成通知
333+ # Build completion notification
334334 - name : Send dingtalk message for Linux
335335 if : ${{ runner.os == 'Linux' }}
336336 uses : ghostoy/dingtalk-action@master
0 commit comments