Skip to content

Commit

Permalink
Merge pull request #1125 from chat2db/dev
Browse files Browse the repository at this point in the history
fix:Change the Packaging Method
  • Loading branch information
Chat2DB-Pro committed Jan 23, 2024
2 parents 97ff957 + 6b099ef commit 9708377
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
build_arg: "--win --x64"
- os: macos-latest
arch: x86_64
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg"
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg"
file_extension: ".dmg"
build_arg: "--mac --x64"
- os: macos-latest
arch: arm64
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test-arm64.dmg"
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test-arm64.dmg"
file_extension: ".dmg"
build_arg: "--mac --arm64"
- os: ubuntu-latest
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage"
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage"
file_extension: ".AppImage"
build_arg: "--linux"
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -192,6 +192,22 @@ jobs:
run: |
ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/test/99.0.${{ github.run_id }}/
# 配置SSH 待上传到服务器
- name: Install ssh key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SERVER_DOWNLOAD_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa ${{ secrets.SERVER_DOWNLOAD_HOST }} >> ~/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa
# 上传到服务器
- name: Upload jar to server with retries
run: |
ssh -t ${{ secrets.SERVER_DOWNLOAD_USERNAME }}@${{ secrets.SERVER_DOWNLOAD_HOST }} "mkdir -p ${{ secrets.SERVER_DOWNLOAD_PATH }}/test//99.0.${{ github.run_id }}" && break
scp ./oss_temp_file/ ${{ secrets.SERVER_DOWNLOAD_USERNAME }}@${{ secrets.SERVER_DOWNLOAD_HOST }}:${{ secrets.SERVER_DOWNLOAD_PATH }}/test//99.0.${{ github.run_id }}/ && break
# 发送到DingTalk
- name: Send dingtalk message
uses: ghostoy/dingtalk-action@master
Expand All @@ -201,7 +217,7 @@ jobs:
content: |
{
"title": "${{ matrix.os }}-test-打包完成通知",
"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}})"
"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}})"
}
# 发送Jar包地址到DingTalk
Expand All @@ -214,5 +230,5 @@ jobs:
content: |
{
"title": "Jar-test-构建完成通知",
"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) "
"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) "
}

0 comments on commit 9708377

Please sign in to comment.