Skip to content

Commit 4df0cad

Browse files
authored
1.1.0-alpha.4
修改springboot版本
2 parents cab28e2 + 76423da commit 4df0cad

10 files changed

Lines changed: 72 additions & 12 deletions

File tree

.github/workflows/PushSDK.yml

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,74 @@ name: Release to Maven Central
22

33
on:
44
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
- 'release/**'
10+
- 'hotfix/**'
511
release:
612
types: [published]
713

814
permissions:
915
contents: read
1016

1117
jobs:
18+
validate-version:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Java
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: temurin
29+
java-version: '11'
30+
cache: maven
31+
32+
- name: Validate Version for Branch Type
33+
run: |
34+
# 获取当前分支
35+
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
36+
echo "Current branch: $BRANCH_NAME"
37+
38+
# 获取当前版本
39+
VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.5.0:exec)
40+
echo "Project version: $VERSION"
41+
42+
# 检查是否SNAPSHOT版本
43+
if echo "$VERSION" | grep -qi SNAPSHOT; then
44+
echo "ERROR: version is SNAPSHOT. Please set a non-SNAPSHOT version before releasing."
45+
exit 1
46+
fi
47+
48+
# 分支版本校验逻辑
49+
if [[ "$BRANCH_NAME" == "develop" ]] && ! [[ "$VERSION" == *"-alpha"* ]]; then
50+
echo "ERROR: develop分支的版本号必须包含 -alpha 后缀(例如:1.1.0-alpha.1)"
51+
exit 1
52+
fi
53+
54+
if [[ "$BRANCH_NAME" == release/* ]] && ! [[ "$VERSION" == *"-beta"* ]]; then
55+
echo "ERROR: release分支的版本号必须包含 -beta 后缀(例如:1.1.0-beta.1)"
56+
exit 1
57+
fi
58+
59+
if [[ "$BRANCH_NAME" == "master" ]] && [[ "$VERSION" == *"-"* ]]; then
60+
echo "ERROR: master分支的版本号必须是正式版本,不能包含 -alpha 或 -beta 后缀"
61+
exit 1
62+
fi
63+
64+
if [[ "$BRANCH_NAME" == hotfix/* ]] && [[ "$VERSION" == *"-"* ]]; then
65+
echo "ERROR: hotfix分支的版本号必须是正式版本,不能包含 -alpha 或 -beta 后缀"
66+
exit 1
67+
fi
68+
69+
echo "Version validation passed for branch: $BRANCH_NAME"
70+
1271
publish:
72+
needs: validate-version
1373
runs-on: ubuntu-latest
1474

1575
steps:
@@ -68,4 +128,4 @@ jobs:
68128
env:
69129
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
70130
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }}
71-
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}
131+
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.timemachinelab</groupId>
88
<artifactId>TmlFoundation</artifactId>
9-
<version>1.1.0-alpha.2</version>
9+
<version>1.1.0-alpha.4</version>
1010
<packaging>pom</packaging>
1111
<name>TmlFoundation</name>
1212
<description>TmlFoundation</description>
@@ -28,7 +28,7 @@
2828
<maven.compiler.target>${java.version}</maven.compiler.target>
2929
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3030
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
31-
<spring-boot.version>2.3.9.RELEASE</spring-boot.version>
31+
<spring-boot.version>2.7.18</spring-boot.version>
3232
</properties>
3333

3434
<dependencyManagement>

tml-sdk-java-bom/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>io.github.timemachinelab</groupId>
77
<artifactId>tml-sdk-java-bom</artifactId>
8-
<version>1.1.0-alpha.2</version>
8+
<version>1.1.0-alpha.4</version>
99
<packaging>pom</packaging>
1010
<name>tml-sdk-java-bom</name>
1111
<description>TmlFoundation BOM</description>
@@ -50,7 +50,7 @@
5050
</distributionManagement>
5151

5252
<properties>
53-
<spring-boot.version>2.3.9.RELEASE</spring-boot.version>
53+
<spring-boot.version>2.7.18</spring-boot.version>
5454
</properties>
5555

5656
<dependencyManagement>

tml-sdk-java-cache-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.timemachinelab</groupId>
88
<artifactId>TmlFoundation</artifactId>
9-
<version>1.1.0-alpha.2</version>
9+
<version>1.1.0-alpha.4</version>
1010
</parent>
1111

1212
<artifactId>tml-sdk-java-cache-api</artifactId>

tml-sdk-java-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.timemachinelab</groupId>
88
<artifactId>TmlFoundation</artifactId>
9-
<version>1.1.0-alpha.2</version>
9+
<version>1.1.0-alpha.4</version>
1010
</parent>
1111

1212
<artifactId>tml-sdk-java-core</artifactId>

tml-sdk-java-fucking-bug/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.timemachinelab</groupId>
88
<artifactId>TmlFoundation</artifactId>
9-
<version>1.1.0-alpha.2</version>
9+
<version>1.1.0-alpha.4</version>
1010
</parent>
1111

1212
<artifactId>tml-sdk-java-fucking-bug</artifactId>

tml-sdk-java-net-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.timemachinelab</groupId>
88
<artifactId>TmlFoundation</artifactId>
9-
<version>1.1.0-alpha.2</version>
9+
<version>1.1.0-alpha.4</version>
1010
</parent>
1111

1212
<artifactId>tml-sdk-java-net-api</artifactId>

tml-sdk-java-web/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>io.github.timemachinelab</groupId>
99
<artifactId>TmlFoundation</artifactId>
10-
<version>1.1.0-alpha.2</version>
10+
<version>1.1.0-alpha.4</version>
1111
</parent>
1212

1313
<artifactId>tml-sdk-java-web</artifactId>

tml-sdk-spring-boot-autoconfigure/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.github.timemachinelab</groupId>
88
<artifactId>TmlFoundation</artifactId>
9-
<version>1.1.0-alpha.2</version>
9+
<version>1.1.0-alpha.4</version>
1010
</parent>
1111

1212
<artifactId>tml-sdk-spring-boot-autoconfigure</artifactId>

tml-sdk-spring-boot-starter-web/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>io.github.timemachinelab</groupId>
99
<artifactId>TmlFoundation</artifactId>
10-
<version>1.1.0-alpha.2</version>
10+
<version>1.1.0-alpha.4</version>
1111
</parent>
1212

1313
<artifactId>tml-sdk-spring-boot-starter-web</artifactId>

0 commit comments

Comments
 (0)