From 45758aa0faf89dd5cd177c2758ca166d643693bc Mon Sep 17 00:00:00 2001 From: GwWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Tue, 9 Dec 2025 18:07:04 +0800 Subject: [PATCH] =?UTF-8?q?chore(release):=20=E4=BD=BF=E7=94=A8=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=89=88=E6=9C=AC=E5=8F=B7=E6=89=93=E5=8C=85=E5=B9=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 release workflow 中增加 Determine tag version 步骤 - 修改 Pack 步骤以使用标签中的版本号 - 更新 README 文档说明项目命名原因及 NuGet 包潜在冲突问题 --- .github/workflows/release.yml | 20 ++++++++++++++++++-- README.md | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e4425f2..eb95bef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,9 +29,25 @@ jobs: - name: Build run: dotnet build --no-restore -c Release - - name: Pack - run: dotnet pack --no-build -c Release -o ./packages + - name: Determine tag version + id: tag_version + run: | + set -e + # GITHUB_REF example: refs/tags/v0.0.1 or refs/tags/0.0.1 + echo "GITHUB_REF = ${GITHUB_REF}" + TAG=${GITHUB_REF#refs/tags/} + # remove leading 'v' or 'V' if present + VERSION=${TAG#v} + VERSION=${VERSION#V} + echo "tag='$TAG' -> version='$VERSION'" + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Pack (use tag version) + run: | + set -e + echo "Packing with version=${{ steps.tag_version.outputs.version }}" + dotnet pack --no-build -c Release -o ./packages -p:PackageVersion=${{ steps.tag_version.outputs.version }} + - name: Get Version and Package Path id: get_version run: | diff --git a/README.md b/README.md index ec6e076..8774a9b 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,5 @@ # 为什么要有这个项目 - 原来的项目是单文件框架,我把框架拆成多个文件,方便管理 -- 纯粹个人自用,要使用还是请访问[QFramework](https://github.com/liangxiegame/QFramework) \ No newline at end of file +- 纯粹个人自用,要使用还是请访问[QFramework](https://github.com/liangxiegame/QFramework) +- 至于修改名字,是因为我为了方便会发布GuGet包,假设将来QFramework也要发布GuGet包,那么就会冲突了 \ No newline at end of file