Skip to content

Commit df9e3b7

Browse files
committed
conflict clash
2 parents 4d629d7 + b6e895b commit df9e3b7

391 files changed

Lines changed: 16073 additions & 6978 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
name: Build Test Client
2+
3+
on:
4+
push:
5+
branches:
6+
- "release_test_2"
7+
8+
jobs:
9+
release:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
include:
14+
- os: windows-latest
15+
file_extension: ".exe"
16+
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test%20Setup%2099.0.${{ github.run_id }}-Test.exe"
17+
build_arg: "--win --x64"
18+
- os: macos-latest
19+
arch: x86_64
20+
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg"
21+
file_extension: ".dmg"
22+
build_arg: "--mac --x64"
23+
- os: macos-latest
24+
arch: arm64
25+
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test-arm64.dmg"
26+
file_extension: ".dmg"
27+
build_arg: "--mac --arm64"
28+
- os: ubuntu-latest
29+
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage"
30+
file_extension: ".AppImage"
31+
build_arg: "--linux"
32+
runs-on: ${{ matrix.os }}
33+
34+
steps:
35+
- name: Check out git repository
36+
uses: actions/checkout@main
37+
38+
# 安装JRE
39+
- name: Install JRE
40+
uses: actions/setup-java@main
41+
with:
42+
java-version: "17"
43+
distribution: "temurin"
44+
java-package: "jre"
45+
# architecture: ${{ matrix.arch == 'arm64' && 'aarch64' || 'x64' }}
46+
47+
# 开放TLS
48+
- name: Enable TLS 1.0 and 1.1 in java.security
49+
run: |
50+
if [ "$RUNNER_OS" = "Windows" ]; then
51+
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
52+
elif [ "$RUNNER_OS" = "Linux" ]; then
53+
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
54+
elif [ "$RUNNER_OS" = "macOS" ]; then
55+
sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
56+
fi
57+
shell: bash
58+
env:
59+
RUNNER_OS: ${{ runner.os }}
60+
JAVA_HOME: ${{ env.JAVA_HOME }}
61+
62+
# JRE拷贝到前端静态目录
63+
- name: Copy JRE to static directory
64+
run: |
65+
mkdir -p chat2db-client/static
66+
cp -r "$JAVA_HOME"/ chat2db-client/static/jre
67+
if [ "${{ runner.os }}" != "Windows" ]; then
68+
chmod -R 777 chat2db-client/static/jre
69+
fi
70+
shell: bash
71+
env:
72+
JAVA_HOME: ${{ env.JAVA_HOME }}
73+
74+
# Linux中删除jre中相关文件
75+
- if: ${{ runner.os == 'Linux' }}
76+
name: Delete File on Linux
77+
run: |
78+
cd chat2db-client/static/jre/
79+
ls -la
80+
rm -rf legal
81+
ls -la
82+
83+
# 安装Node.js
84+
- name: Install Node.js
85+
uses: actions/setup-node@main
86+
with:
87+
node-version: "16"
88+
cache: "yarn"
89+
cache-dependency-path: chat2db-client/yarn.lock
90+
91+
# 安装Java
92+
- name: Install Java and Maven
93+
uses: actions/setup-java@main
94+
with:
95+
java-version: "17"
96+
distribution: "temurin"
97+
cache: "maven"
98+
99+
# 打包Web前端资源
100+
- name: Build FE Static
101+
run: |
102+
cd chat2db-client
103+
yarn install --frozen-lockfile
104+
yarn run build:web:prod --app_version=99.0.${{ github.run_id }} --app_port=10822
105+
cp -r dist ../chat2db-server/chat2db-server-start/src/main/resources/static/front
106+
cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf/
107+
108+
# 打包后端工程 & 发送到前端
109+
- name: Build BE Static
110+
run: |
111+
mvn clean package -B '-Dmaven.test.skip=true' -f chat2db-server/pom.xml
112+
mkdir -p chat2db-client/versions/99.0.${{ github.run_id }}/static
113+
echo -n 99.0.${{ github.run_id }} > chat2db-client/version
114+
cp -r chat2db-client/version chat2db-client/versions/
115+
cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/99.0.${{ github.run_id }}/static/
116+
117+
# 打包桌面端前端资源
118+
- name: Prepare Build Electron
119+
run: |
120+
cd chat2db-client
121+
yarn run build:web:desktop --app_version=99.0.${{ github.run_id }} --app_port=10822
122+
cp -r dist ./versions/99.0.${{ github.run_id }}/
123+
rm -r dist
124+
125+
# 打包Electron
126+
- name: Build/release Electron app
127+
uses: samuelmeuli/action-electron-builder@v1
128+
with:
129+
package_root: "chat2db-client/"
130+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
131+
mac_certs: ${{ secrets.mac_certs }}
132+
mac_certs_password: ${{ secrets.mac_certs_password }}
133+
skip_build: true
134+
args: >
135+
-c.appId=com.chat2db.test
136+
-c.productName=Chat2DB-Test
137+
-c.win.publisherName=Chat2DB-Test
138+
-c.nsis.shortcutName=Chat2DB-Test
139+
-c.extraMetadata.version=99.0.${{ github.run_id }}-Test
140+
${{ matrix.build_arg}}
141+
142+
# 公证&签名 Mac App
143+
- name: Notarize MacOS x86_64 App
144+
if: matrix.os == 'macos-latest' && matrix.arch == 'x86_64'
145+
run: |
146+
xcrun notarytool store-credentials "Chat2DB" --apple-id "${{ secrets.MAC_APPLE_ID }}" --password "${{ secrets.MAC_APPLE_PASSWORD }}" --team-id "${{ secrets.MAC_TEAM_ID }}"
147+
xcrun notarytool submit chat2db-client/release/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg --keychain-profile "Chat2DB"
148+
149+
# Build Jar包
150+
- name: Prepare upload for Jar
151+
if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }}
152+
run: |
153+
mkdir -p oss_temp_file
154+
cp chat2db-client/versions/99.0.${{ github.run_id }}/static/chat2db-server-start.jar ./oss_temp_file
155+
cp -r chat2db-client/release/*.dmg ./oss_temp_file
156+
cp -r chat2db-client/versions/99.0.${{ github.run_id }}/dist ./oss_temp_file/dist
157+
cd chat2db-client/versions/99.0.${{ github.run_id }}/ && zip -r 99.0.${{ github.run_id }}.zip ./
158+
cp -r 99.0.${{ github.run_id }}.zip ../../../oss_temp_file
159+
cd static/ && zip -r chat2db-server-start.zip ./
160+
cp -r chat2db-server-start.zip ../../../../oss_temp_file
161+
162+
# 准备发往OSS的文件
163+
- name: Prepare upload for OSS
164+
run: |
165+
mkdir -p oss_temp_file
166+
cp -r chat2db-client/release/*${{ matrix.file_extension }} ./oss_temp_file
167+
168+
# 设置OSS
169+
- name: Set up oss utils
170+
uses: yizhoumo/setup-ossutil@v1
171+
with:
172+
endpoint: "oss-accelerate.aliyuncs.com"
173+
access-key-id: ${{ secrets.OSS_ACCESS_KEY_ID }}
174+
access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
175+
ossutil-version: "1.7.16"
176+
177+
# 上传到OSS
178+
- name: Upload to OSS
179+
run: |
180+
ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/test/99.0.${{ github.run_id }}/
181+
182+
# 发送到DingTalk
183+
- name: Send dingtalk message
184+
uses: ghostoy/dingtalk-action@master
185+
with:
186+
webhook: ${{ secrets.DINGTALK_WEBHOOK }}
187+
msgtype: markdown
188+
content: |
189+
{
190+
"title": "${{ matrix.os }}-test-打包完成通知",
191+
"text": "# ${{ matrix.os }}-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 ### 下载地址:[${{matrix.file_name}}](${{matrix.file_name}})"
192+
}
193+
194+
# 发送Jar包地址到DingTalk
195+
- if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }}
196+
name: Send dingtalk message
197+
uses: ghostoy/dingtalk-action@master
198+
with:
199+
webhook: ${{ secrets.DINGTALK_WEBHOOK }}
200+
msgtype: markdown
201+
content: |
202+
{
203+
"title": "Jar-test-构建完成通知",
204+
"text": "### jar包下载地址:[https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/chat2db-server-start.zip](https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/chat2db-server-start.zip) "
205+
}

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"alicdn",
66
"aliyuncs",
77
"altool",
8+
"andale",
89
"antd",
910
"asar",
1011
"AZUREAI",
@@ -14,6 +15,7 @@
1415
"charsets",
1516
"chmod",
1617
"CLOB",
18+
"Consolas",
1719
"Datas",
1820
"datasource",
1921
"Datetime",
@@ -33,10 +35,13 @@
3335
"ghostoy",
3436
"hljs",
3537
"iconfont",
38+
"indexs",
3639
"jdbc",
3740
"kingbase",
41+
"lucida",
3842
"macos",
3943
"Mddhhmmss",
44+
"Menlo",
4045
"mkdir",
4146
"monaco",
4247
"msgtype",
@@ -47,6 +52,7 @@
4752
"ossutil",
4853
"partialize",
4954
"pgsql",
55+
"plsql",
5056
"pnpm",
5157
"Popconfirm",
5258
"Prec",
@@ -57,12 +63,15 @@
5763
"samuelmeuli",
5864
"scroller",
5965
"Sercurity",
66+
"singlestoredb",
6067
"sortablejs",
6168
"SQLSERVER",
6269
"temurin",
6370
"thymeleaf",
6471
"Tigger",
6572
"togglefullscreen",
73+
"transactsql",
74+
"trino",
6675
"umijs",
6776
"umirc",
6877
"USERANDPASSWORD",

0 commit comments

Comments
 (0)