fix(pipeline): add safe.directory configuration for Git in SemanticReleasingExecutor

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-08 10:49:13 +08:00
parent 39e4f570d1
commit efa16c9614

View File

@ -31,6 +31,7 @@ class SemanticReleasingExecutor {
steps.sh "apt-get -y update && apt-get install -y --no-install-recommends git apt-transport-https ca-certificates curl wget gnupg"
steps.log.info("SemanticReleasingExecutor", "Installing semantic-release plugins...")
steps.sh "npm install -g ${plugins.join(' ')}"
steps.sh "git config --global --add safe.directory ${steps.env.workroot}"
steps.sh "semantic-release"
steps.log.info("SemanticReleasingExecutor", "Semantic release completed, read latest version from VERSION file")
steps.env.LATEST_VERSION = steps.readFile('VERSION').trim()