修复远程终端识别本地操作系统问题并完善工作流配置 #7
@@ -33,8 +33,8 @@ jobs:
|
|||||||
git config --global --add safe.directory /github/workspace
|
git config --global --add safe.directory /github/workspace
|
||||||
|
|
||||||
# 配置用户信息
|
# 配置用户信息
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "devstar"
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "devstar@noreply.github.com"
|
||||||
|
|
||||||
- name: 自动递增版本号
|
- name: 自动递增版本号
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
@@ -43,8 +43,10 @@ jobs:
|
|||||||
CURRENT_VERSION=$(jq -r '.version' package.json)
|
CURRENT_VERSION=$(jq -r '.version' package.json)
|
||||||
echo "当前版本: $CURRENT_VERSION"
|
echo "当前版本: $CURRENT_VERSION"
|
||||||
|
|
||||||
# 分解版本号
|
# 分解版本号(使用 sh 兼容的语法)
|
||||||
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
|
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))
|
NEW_PATCH=$((PATCH + 1))
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "devstar",
|
"name": "devstar",
|
||||||
"displayName": "%displayName%",
|
"displayName": "%displayName%",
|
||||||
"description": "%description%",
|
"description": "%description%",
|
||||||
"version": "0.4.4",
|
"version": "0.5.1",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"publisher": "mengning",
|
"publisher": "mengning",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
Reference in New Issue
Block a user