Skip to content

Commit 9e8a7ca

Browse files
committed
Merge remote-tracking branch 'origin/developing' into developing
2 parents 248f99b + e2bdf7c commit 9e8a7ca

3 files changed

Lines changed: 161 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ jobs:
109109
cp -r $JAVA_HOME chat2db-client/static/jre
110110
chmod -R 777 chat2db-client/static/jre/
111111
112+
# 复制jre Linux
112113
- name: Copy Jre for Linux
113114
if: ${{ runner.os == 'Linux' }}
114115
run: |
@@ -220,6 +221,14 @@ jobs:
220221
xcrun altool --notarize-app --primary-bundle-id "${{secrets.MAC_PRIMARY_BUNDLE_ID}}" --username "${{secrets.MAC_APPLE_ID}}" --password "${{secrets.MAC_APPLE_PASSWORD}}" --asc-provider "${{secrets.MAC_ASC_PROVIDER}}" -t osx --file chat2db-client/release/Chat2DB-${{ steps.chat2db_version.outputs.substring }}-arm64.dmg
221222
222223
# Linux
224+
- name: Delete File
225+
if: ${{ runner.os == 'Linux' }}
226+
run: |
227+
cd chat2db-client/static/jre/
228+
ls -la
229+
rm -rf legal
230+
ls -la
231+
223232
- name: Build/release Electron app for Linux
224233
if: ${{ runner.os == 'Linux' }}
225234
uses: samuelmeuli/action-electron-builder@v1
@@ -261,7 +270,6 @@ jobs:
261270
run: |
262271
mkdir oss_temp_file
263272
cp -r chat2db-client/release/*.AppImage ./oss_temp_file
264-
cp -r chat2db-client/release/*_amd64.deb ./oss_temp_file
265273
266274
# 把文件上传到OSS 方便下载
267275
- name: Set up oss utils

.github/workflows/release_test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
cp -r $JAVA_HOME chat2db-client/static/jre
102102
chmod -R 777 chat2db-client/static/jre/
103103
104-
# 复制jre macOS
104+
# 复制jre Linux
105105
- name: Copy Jre for Linux
106106
if: ${{ runner.os == 'Linux' }}
107107
run: |
@@ -210,6 +210,14 @@ jobs:
210210
xcrun altool --notarize-app --primary-bundle-id "${{secrets.MAC_PRIMARY_BUNDLE_ID}}" --username "${{secrets.MAC_APPLE_ID}}" --password "${{secrets.MAC_APPLE_PASSWORD}}" --asc-provider "${{secrets.MAC_ASC_PROVIDER}}" -t osx --file chat2db-client/release/Chat2DB-Test-99.0.${{ github.run_id }}-Test-arm64.dmg
211211
212212
# Linux
213+
- name: Delete File
214+
if: ${{ runner.os == 'Linux' }}
215+
run: |
216+
cd chat2db-client/static/jre/
217+
ls -la
218+
rm -rf legal
219+
ls -la
220+
213221
- name: Build/release Electron app for Linux
214222
if: ${{ runner.os == 'Linux' }}
215223
uses: samuelmeuli/action-electron-builder@v1

.github/workflows/test_linux.yml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# # Workflow's name
2+
# name: Build Linux Client
3+
4+
# # Workflow's trigger
5+
# # 在release_test 分支收到推送的时候触发
6+
# on: [push, pull_request]
7+
8+
# jobs:
9+
# release:
10+
# strategy:
11+
# fail-fast: false
12+
# matrix:
13+
# include:
14+
# - os: ubuntu-latest
15+
# runs-on: ${{ matrix.os }}
16+
17+
# steps:
18+
# - name: Check out git repository
19+
# uses: actions/checkout@main
20+
21+
# # 安装jre Linux
22+
# - name: Install Jre for Linux
23+
# if: ${{ runner.os == 'Linux' }}
24+
# uses: actions/setup-java@main
25+
# with:
26+
# java-version: "17"
27+
# distribution: "temurin"
28+
# java-package: "jre"
29+
30+
# # java.security 开放tls1 Linux
31+
# - name: Enable tls1
32+
# if: ${{ runner.os == 'Linux' }}
33+
# run: |
34+
# sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" ${{ env.JAVA_HOME }}/conf/security/java.security
35+
36+
# # 复制jre Linux
37+
# - name: Copy Jre for Linux
38+
# if: ${{ runner.os == 'Linux' }}
39+
# run: |
40+
# mkdir chat2db-client/static
41+
# cp -r $JAVA_HOME chat2db-client/static/jre
42+
# chmod -R 777 chat2db-client/static/jre/
43+
44+
# # 安装node
45+
# - name: Install Node.js
46+
# uses: actions/setup-node@main
47+
# with:
48+
# node-version: 16
49+
# cache: "yarn"
50+
# cache-dependency-path: chat2db-client/yarn.lock
51+
52+
# # 安装java
53+
# - name: Install Java and Maven
54+
# uses: actions/setup-java@main
55+
# with:
56+
# java-version: "17"
57+
# distribution: "temurin"
58+
# cache: "maven"
59+
60+
# # 构建静态文件信息
61+
# - name: Yarn install & build & copy
62+
# run: |
63+
# cd chat2db-client
64+
# yarn install
65+
# yarn run build:web:prod --app_version=99.0.${{ github.run_id }} --app_port=10824
66+
# cp -r dist ../chat2db-server/chat2db-server-start/src/main/resources/static/front
67+
68+
# # 编译服务端java版本
69+
# - name: Build Java
70+
# run: mvn clean package -B '-Dmaven.test.skip=true' -f chat2db-server/pom.xml
71+
72+
# # touch versions
73+
# - name: touch versions
74+
# run: |
75+
# cd chat2db-client
76+
# mkdir versions
77+
# mkdir versions/99.0.${{ github.run_id }}
78+
# mkdir versions/99.0.${{ github.run_id }}/static
79+
# touch version
80+
# echo -n 99.0.${{ github.run_id }} > version
81+
# cp -r version ./versions/
82+
83+
# # 复制服务端java 到指定位置
84+
# - name: Copy App
85+
# run: |
86+
# cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/99.0.${{ github.run_id }}/static/
87+
# cp -r chat2db-server/chat2db-server-start/target/lib chat2db-client/versions/99.0.${{ github.run_id }}/static/lib
88+
89+
# - name: Prepare Build Electron
90+
# run: |
91+
# cd chat2db-client
92+
# yarn run build:web:desktop --app_version=99.0.${{ github.run_id }} --app_port=10824
93+
# cp -r dist ./versions/99.0.${{ github.run_id }}/
94+
# rm -r dist
95+
96+
# - name: Test File
97+
# run: |
98+
# cd chat2db-client/static/jre/
99+
# ls -la
100+
# rm -rf legal
101+
# ls -la
102+
103+
# # Linux
104+
# - name: Build/release Electron app for Linux
105+
# if: ${{ runner.os == 'Linux' }}
106+
# uses: samuelmeuli/action-electron-builder@v1
107+
# with:
108+
# package_root: "chat2db-client/"
109+
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
110+
# skip_build: true
111+
# args: "-c.appId=com.chat2db.test -c.productName=Chat2DB-Test -c.nsis.shortcutName=Chat2DB-Test -c.extraMetadata.version=99.0.${{ github.run_id }}-Test --linux"
112+
113+
# # 准备要需要的数据 Linux
114+
# - name: Prepare upload for Linux
115+
# if: runner.os == 'Linux'
116+
# run: |
117+
# mkdir oss_temp_file
118+
# cp -r chat2db-client/release/*.AppImage ./oss_temp_file
119+
120+
# # 把文件上传到OSS 方便下载
121+
# - name: Set up oss utils
122+
# uses: yizhoumo/setup-ossutil@v1
123+
# with:
124+
# endpoint: "oss-accelerate.aliyuncs.com"
125+
# access-key-id: ${{ secrets.OSS_ACCESS_KEY_ID }}
126+
# access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
127+
# ossutil-version: "latest"
128+
# - name: Upload to oss
129+
# run: |
130+
# ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/test/99.0.${{ github.run_id }}/
131+
132+
# # 构建完成通知
133+
# - name: Send dingtalk message for Linux
134+
# if: ${{ runner.os == 'Linux' }}
135+
# uses: ghostoy/dingtalk-action@master
136+
# with:
137+
# webhook: ${{ secrets.DINGTALK_WEBHOOK }}
138+
# msgtype: markdown
139+
# content: |
140+
# {
141+
# "title": "Linux-test-打包完成通知",
142+
# "text": "# Linux-test-打包完成通知 \n ![bang](https://oss.sqlgpt.cn/static/bang100.gif) \n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }}) \n ### Linux下载地址:[https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage](https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage) "
143+
# }

0 commit comments

Comments
 (0)