ci(workflows): 改进发布工作流中的版本号处理
使用 bash shell 执行版本更新脚本,并添加版本号输出日志
This commit is contained in:
1 parent
10d82fce1b
commit
b393d73176
1 file changed
+4
-1
@@ -55,12 +55,15 @@ jobs:
|
|||||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
|
|
||||||
- name: Bump version and generate changelog
|
- name: Bump version and generate changelog
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# 根据 commit 信息自动更新版本和生成 changelog
|
# 根据 commit 信息自动更新版本和生成 changelog
|
||||||
pnpm release
|
pnpm release
|
||||||
|
|
||||||
# 获取新版本号
|
# 获取新版本号
|
||||||
echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
|
version=$(node -p "require('./package.json').version")
|
||||||
|
echo "VERSION=$version" >> $GITHUB_ENV
|
||||||
|
echo "Version set to: $version"
|
||||||
|
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in new issue
Block a user