File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 # 额外检查 username 是否也被正确替换了(只显示前几位)
5757 grep "<username>" ~/.m2/settings.xml | sed 's/<username>\(.\{3\}\).*<\/username>/<username>\1***<\/username>/'
5858
59- - name : Ensure release version
60- run : |
61- echo "Debug: Fetching project version..."
62- # 尝试获取版本号,将结果保存到文件以便调试
63- # 使用 -pl . 代替 -N:允许 Maven 加载整个 Reactor (从而找到 BOM) 但只在当前项目(Root)执行目标
64- if ! mvn org.apache.maven.plugins:maven-help-plugin:3.4.0:evaluate "-Dexpression=project.version" -q -DforceStdout -pl . > version.txt; then
65- echo "Error: Failed to get version from Maven. Re-running with debug output:"
66- mvn org.apache.maven.plugins:maven-help-plugin:3.4.0:evaluate "-Dexpression=project.version" -DforceStdout -pl .
67- exit 1
68- fi
69-
70- VERSION=$(cat version.txt)
71- echo "Debug: Detected version: '$VERSION'"
72-
73- # 去除可能的空白字符
74- VERSION=$(echo "$VERSION" | xargs)
75-
76- if [ -z "$VERSION" ]; then
77- echo "Error: Version result is empty."
78- exit 1
79- fi
80-
81- if echo "$VERSION" | grep -qi SNAPSHOT; then
82- echo "ERROR: version is SNAPSHOT. Please set a non-SNAPSHOT version before releasing."
83- exit 1
84- fi
85-
8659 - name : Deploy to Central Portal
8760 run : |
8861 # 强制设置 GPG 终端环境
Original file line number Diff line number Diff line change 139139 <configuration >
140140 <publishingServerId >ossrh</publishingServerId >
141141 <autoPublish >true</autoPublish >
142- <waitUntil >published</waitUntil >
143142 <excludeArtifacts >
144143 <excludeArtifact >io.github.timemachinelab:TmlFoundation</excludeArtifact >
145144 </excludeArtifacts >
Original file line number Diff line number Diff line change 132132 <configuration >
133133 <publishingServerId >ossrh</publishingServerId >
134134 <autoPublish >true</autoPublish >
135- <waitUntil >published</waitUntil >
136135 </configuration >
137136 </plugin >
138137 </plugins >
You can’t perform that action at this time.
0 commit comments