修改工作流分解版本后的方法&&优化配置用户信息
This commit is contained in:
@@ -33,8 +33,8 @@ jobs:
|
||||
git config --global --add safe.directory /github/workspace
|
||||
|
||||
# 配置用户信息
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "devstar"
|
||||
git config --global user.email "devstar@noreply.github.com"
|
||||
|
||||
- name: 自动递增版本号
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
@@ -43,8 +43,10 @@ jobs:
|
||||
CURRENT_VERSION=$(jq -r '.version' package.json)
|
||||
echo "当前版本: $CURRENT_VERSION"
|
||||
|
||||
# 分解版本号
|
||||
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
|
||||
# 分解版本号(使用 sh 兼容的语法)
|
||||
MAJOR=$(echo "$CURRENT_VERSION" | cut -d'.' -f1)
|
||||
MINOR=$(echo "$CURRENT_VERSION" | cut -d'.' -f2)
|
||||
PATCH=$(echo "$CURRENT_VERSION" | cut -d'.' -f3)
|
||||
|
||||
# 递增补丁版本号
|
||||
NEW_PATCH=$((PATCH + 1))
|
||||
@@ -75,4 +77,4 @@ jobs:
|
||||
run: |
|
||||
npm run publish
|
||||
env:
|
||||
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
||||
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "devstar",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"version": "0.4.4",
|
||||
"version": "0.5.1",
|
||||
"keywords": [],
|
||||
"publisher": "mengning",
|
||||
"engines": {
|
||||
|
||||
Reference in New Issue
Block a user