From ee6e825e8785c0fdc80ac64e07972a083355ff5b Mon Sep 17 00:00:00 2001 From: trueai-org Date: Wed, 26 Jun 2024 10:00:48 +0800 Subject: [PATCH] condition delete by pre relasese --- .github/workflows/dotnet-linux-arm64.yml | 11 ++++++++++- .github/workflows/dotnet-linux-x64.yml | 11 ++++++++++- .github/workflows/dotnet-osx-arm64.yml | 11 ++++++++++- .github/workflows/dotnet-osx-x64.yml | 11 ++++++++++- .github/workflows/dotnet-win-arm64.yml | 18 ++++++++++++++---- .github/workflows/dotnet-win-x64.yml | 16 +++++++++++++--- CHANGELOG.md | 21 ++++++++++++++++++++- 7 files changed, 87 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dotnet-linux-arm64.yml b/.github/workflows/dotnet-linux-arm64.yml index 43e3f55..fe42b3c 100644 --- a/.github/workflows/dotnet-linux-arm64.yml +++ b/.github/workflows/dotnet-linux-arm64.yml @@ -40,12 +40,21 @@ jobs: - name: 删除 PDB 和部分 XML 文件 run: | # 删除目录中的 .pdb 文件(如果存在) - rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-arm64/publish/*.pdb + # rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-arm64/publish/*.pdb rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-arm64/publish/*.xml rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-arm64/publish/*.bat rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-arm64/publish/WinSW-x64.exe rm -rf src/MDriveSync.Client.API/bin/Release/net8.0/linux-arm64/publish/wwwroot/driver/ + - name: 条件性删除 PDB 文件 + run: | + # 根据版本标签包含 beta, rc, alpha 的条件来决定是否删除 .pdb 文件 + if [[ ! "${{ github.event.release.tag_name }}" =~ (beta|rc|alpha) ]]; then + echo "Deleting .pdb files..." + rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-arm64/publish/*.pdb + else + echo "Preserving .pdb files for pre-release versions..." + - name: 创建临时目录并复制发布文件 run: | mkdir -p temp_publish diff --git a/.github/workflows/dotnet-linux-x64.yml b/.github/workflows/dotnet-linux-x64.yml index 806f8fd..c1b6872 100644 --- a/.github/workflows/dotnet-linux-x64.yml +++ b/.github/workflows/dotnet-linux-x64.yml @@ -40,12 +40,21 @@ jobs: - name: 删除 PDB 和部分 XML 文件 run: | # 删除目录中的 .pdb 文件(如果存在) - rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-x64/publish/*.pdb + # rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-x64/publish/*.pdb rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-x64/publish/*.xml rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-x64/publish/*.bat rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-x64/publish/WinSW-x64.exe rm -rf src/MDriveSync.Client.API/bin/Release/net8.0/linux-x64/publish/wwwroot/driver/ + - name: 条件性删除 PDB 文件 + run: | + # 根据版本标签包含 beta, rc, alpha 的条件来决定是否删除 .pdb 文件 + if [[ ! "${{ github.event.release.tag_name }}" =~ (beta|rc|alpha) ]]; then + echo "Deleting .pdb files..." + rm -f src/MDriveSync.Client.API/bin/Release/net8.0/linux-x64/publish/*.pdb + else + echo "Preserving .pdb files for pre-release versions..." + - name: 创建临时目录并复制发布文件 run: | mkdir -p temp_publish diff --git a/.github/workflows/dotnet-osx-arm64.yml b/.github/workflows/dotnet-osx-arm64.yml index e86edcb..cd24fa5 100644 --- a/.github/workflows/dotnet-osx-arm64.yml +++ b/.github/workflows/dotnet-osx-arm64.yml @@ -40,11 +40,20 @@ jobs: - name: 删除 PDB 和部分 XML 文件 run: | # 删除目录中的 .pdb 文件(如果存在) - rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-arm64/publish/*.pdb + # rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-arm64/publish/*.pdb rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-arm64/publish/*.xml rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-arm64/publish/*.bat rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-arm64/publish/WinSW-x64.exe rm -rf src/MDriveSync.Client.API/bin/Release/net8.0/osx-arm64/publish/wwwroot/driver/ + + - name: 条件性删除 PDB 文件 + run: | + # 根据版本标签包含 beta, rc, alpha 的条件来决定是否删除 .pdb 文件 + if [[ ! "${{ github.event.release.tag_name }}" =~ (beta|rc|alpha) ]]; then + echo "Deleting .pdb files..." + rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-arm64/publish/*.pdb + else + echo "Preserving .pdb files for pre-release versions..." - name: 创建临时目录并复制发布文件 run: | diff --git a/.github/workflows/dotnet-osx-x64.yml b/.github/workflows/dotnet-osx-x64.yml index 01b4cec..864b608 100644 --- a/.github/workflows/dotnet-osx-x64.yml +++ b/.github/workflows/dotnet-osx-x64.yml @@ -40,11 +40,20 @@ jobs: - name: 删除 PDB 和部分 XML 文件 run: | # 删除目录中的 .pdb 文件(如果存在) - rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-x64/publish/*.pdb + # rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-x64/publish/*.pdb rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-x64/publish/*.xml rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-x64/publish/*.bat rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-x64/publish/WinSW-x64.exe rm -rf src/MDriveSync.Client.API/bin/Release/net8.0/osx-x64/publish/wwwroot/driver/ + + - name: 条件性删除 PDB 文件 + run: | + # 根据版本标签包含 beta, rc, alpha 的条件来决定是否删除 .pdb 文件 + if [[ ! "${{ github.event.release.tag_name }}" =~ (beta|rc|alpha) ]]; then + echo "Deleting .pdb files..." + rm -f src/MDriveSync.Client.API/bin/Release/net8.0/osx-x64/publish/*.pdb + else + echo "Preserving .pdb files for pre-release versions..." - name: 创建临时目录并复制发布文件 run: | diff --git a/.github/workflows/dotnet-win-arm64.yml b/.github/workflows/dotnet-win-arm64.yml index 8acaf72..4ff3310 100644 --- a/.github/workflows/dotnet-win-arm64.yml +++ b/.github/workflows/dotnet-win-arm64.yml @@ -37,11 +37,21 @@ jobs: echo "发布目录内容:" dir src/MDriveSync.Client.API/bin/Release/net8.0/win-arm64/publish - - name: 删除 PDB 和部分 XML 文件 - run: | - # 删除目录中的 .pdb 和部分 .xml 文件(如果存在) - Remove-Item src/MDriveSync.Client.API/bin/Release/net8.0/win-arm64/publish/*.pdb -Force -ErrorAction SilentlyContinue + # - name: 删除 PDB 和部分 XML 文件 + # run: | + # # 删除目录中的 .pdb 和部分 .xml 文件(如果存在) + # Remove-Item src/MDriveSync.Client.API/bin/Release/net8.0/win-arm64/publish/*.pdb -Force -ErrorAction SilentlyContinue + - name: 条件性删除 PDB 文件 + run: | + $tagName = "${{ github.event.release.tag_name }}" + if (-not ($tagName -match "beta|rc|alpha")) { + echo "Deleting .pdb files..." + Remove-Item src/MDriveSync.Client.API/bin/Release/net8.0/win-arm64/publish/*.pdb -Force -ErrorAction SilentlyContinue + } else { + echo "Preserving .pdb files for pre-release versions..." + } + - name: 压缩构建产物 run: | # 将发布目录中的文件压缩为 zip 文件 diff --git a/.github/workflows/dotnet-win-x64.yml b/.github/workflows/dotnet-win-x64.yml index 6f3cab8..5d5580a 100644 --- a/.github/workflows/dotnet-win-x64.yml +++ b/.github/workflows/dotnet-win-x64.yml @@ -37,10 +37,20 @@ jobs: echo "发布目录内容:" dir src/MDriveSync.Client.API/bin/Release/net8.0/win-x64/publish - - name: 删除 PDB 和部分 XML 文件 + # - name: 删除 PDB 和部分 XML 文件 + # run: | + # # 删除目录中的 .pdb 和部分 .xml 文件(如果存在) + # Remove-Item src/MDriveSync.Client.API/bin/Release/net8.0/win-x64/publish/*.pdb -Force -ErrorAction SilentlyContinue + + - name: 条件性删除 PDB 文件 run: | - # 删除目录中的 .pdb 和部分 .xml 文件(如果存在) - Remove-Item src/MDriveSync.Client.API/bin/Release/net8.0/win-x64/publish/*.pdb -Force -ErrorAction SilentlyContinue + $tagName = "${{ github.event.release.tag_name }}" + if (-not ($tagName -match "beta|rc|alpha")) { + echo "Deleting .pdb files..." + Remove-Item src/MDriveSync.Client.API/bin/Release/net8.0/win-x64/publish/*.pdb -Force -ErrorAction SilentlyContinue + } else { + echo "Preserving .pdb files for pre-release versions..." + } - name: 压缩构建产物 run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 766aa2f..6dd0733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,23 @@ -# MDrive 汾ʷ +# MDrive 汾 + +> 汾˵ + +1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0 + +- alphaͨζŰ汾ڵģܲȶδɵĹܣҪڲԡ +- beta alpha һܸߣԿ֪ܰδ֪Ĵ +- rcѡ汾ӽղƷҪڲȻڵϸ΢ȱݣͨΪѾ㹻ȶʺϷ + +汾ź alpha.1beta.2 ȣʾý׶εĵ汾Խ󣬱˸޸ĻŻ + +- 1.0.0-alphaʾһڵ alpha ԰汾 +- 1.0.0-alpha.1ʾ alpha 汾ϵĵһ޶ +- 1.0.0-alpha.betaʾ alpha 汾󣬼 beta ԵĸĽ +- 1.0.0-betaʾ beta Խ׶Ρ +- 1.0.0-beta.2ʾ beta ׶εĵڶ޶ +- 1.0.0-beta.11ʾ beta ׶εĵʮһ޶ +- 1.0.0-rc.1ʾѡ׶εĵһ޶ +- 1.0.0ʾʽİ汾ԤIJԺ޶ɣΪȶɿġ ## v1.5.5