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