Skip to content

Commit 9708377

Browse files
authored
Merge pull request #1125 from chat2db/dev
fix:Change the Packaging Method
2 parents 97ff957 + 6b099ef commit 9708377

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/release_test.yml

+21-5
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
build_arg: "--win --x64"
1818
- os: macos-latest
1919
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"
20+
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg"
2121
file_extension: ".dmg"
2222
build_arg: "--mac --x64"
2323
- os: macos-latest
2424
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"
25+
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test-arm64.dmg"
2626
file_extension: ".dmg"
2727
build_arg: "--mac --arm64"
2828
- 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"
29+
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage"
3030
file_extension: ".AppImage"
3131
build_arg: "--linux"
3232
runs-on: ${{ matrix.os }}
@@ -192,6 +192,22 @@ jobs:
192192
run: |
193193
ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/test/99.0.${{ github.run_id }}/
194194
195+
# 配置SSH 待上传到服务器
196+
- name: Install ssh key
197+
run: |
198+
mkdir -p ~/.ssh
199+
echo "${{ secrets.SERVER_DOWNLOAD_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
200+
chmod 600 ~/.ssh/id_rsa
201+
ssh-keyscan -t rsa ${{ secrets.SERVER_DOWNLOAD_HOST }} >> ~/.ssh/known_hosts
202+
eval `ssh-agent -s`
203+
ssh-add ~/.ssh/id_rsa
204+
# 上传到服务器
205+
- name: Upload jar to server with retries
206+
run: |
207+
ssh -t ${{ secrets.SERVER_DOWNLOAD_USERNAME }}@${{ secrets.SERVER_DOWNLOAD_HOST }} "mkdir -p ${{ secrets.SERVER_DOWNLOAD_PATH }}/test//99.0.${{ github.run_id }}" && break
208+
scp ./oss_temp_file/ ${{ secrets.SERVER_DOWNLOAD_USERNAME }}@${{ secrets.SERVER_DOWNLOAD_HOST }}:${{ secrets.SERVER_DOWNLOAD_PATH }}/test//99.0.${{ github.run_id }}/ && break
209+
210+
195211
# 发送到DingTalk
196212
- name: Send dingtalk message
197213
uses: ghostoy/dingtalk-action@master
@@ -201,7 +217,7 @@ jobs:
201217
content: |
202218
{
203219
"title": "${{ matrix.os }}-test-打包完成通知",
204-
"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}})"
220+
"text": "# ${{ matrix.os }}-test-打包完成通知\n !\n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }})\n ### 下载地址:[${{matrix.file_name}}](${{matrix.file_name}})"
205221
}
206222
207223
# 发送Jar包地址到DingTalk
@@ -214,5 +230,5 @@ jobs:
214230
content: |
215231
{
216232
"title": "Jar-test-构建完成通知",
217-
"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) "
233+
"text": "### jar包下载地址:[https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/chat2db-server-start.zip](https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/chat2db-server-start.zip) "
218234
}

0 commit comments

Comments
 (0)