mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
chore(release): 使用标签版本号打包并更新文档
- 在 release workflow 中增加 Determine tag version 步骤 - 修改 Pack 步骤以使用标签中的版本号 - 更新 README 文档说明项目命名原因及 NuGet 包潜在冲突问题
This commit is contained in:
parent
da67b5651a
commit
45758aa0fa
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@ -29,8 +29,24 @@ 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user