Skip to content

Commit

Permalink
Update dotnet-linux-x64.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
trueai-org authored Jun 20, 2024
1 parent 12b1e61 commit fc90c6b
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/dotnet-linux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,24 @@ jobs:
run: |
mkdir -p temp_publish
cp -r src/MDriveSync.Client.API/bin/Release/net8.0/linux-x64/publish/* temp_publish/
cp scripts/run_app.sh temp_publish/
- name: 复制 run_app.sh 脚本
- name: 压缩构建产物为 tar.gz
run: |
cp src/scripts/run_app.sh temp_publish/
# 将发布目录中的文件压缩为 tar.gz 文件
tar -czvf "MDrive-linux-x64-${{ github.event.release.tag_name }}.tar.gz" -C temp_publish .
- name: 压缩构建产物
- name: 检查 tar.gz 文件
run: |
# 将发布目录中的文件压缩为 zip 文件
cd temp_publish
zip -r "../MDrive-linux-x64-${{ github.event.release.tag_name }}.zip" ./*
cd ..
echo "生成的 tar.gz 文件:"
ls "MDrive-linux-x64-${{ github.event.release.tag_name }}.tar.gz"
- name: 检查 ZIP 文件
run: |
echo "生成的 ZIP 文件:"
ls "MDrive-linux-x64-${{ github.event.release.tag_name }}.zip"
- name: 上传 ZIP 文件到 release
- name: 上传 tar.gz 文件到 release
uses: actions/upload-release-asset@v1 # 使用最新稳定版本
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "MDrive-linux-x64-${{ github.event.release.tag_name }}.zip"
asset_name: "MDrive-linux-x64-${{ github.event.release.tag_name }}.zip"
asset_content_type: application/zip
asset_path: "MDrive-linux-x64-${{ github.event.release.tag_name }}.tar.gz"
asset_name: "MDrive-linux-x64-${{ github.event.release.tag_name }}.tar.gz"
asset_content_type: application/gzip

0 comments on commit fc90c6b

Please sign in to comment.