Skip to content

Commit d6fd6f7

Browse files
authored
Merge pull request #134 from isomd/main
cicd流
2 parents c80b3e5 + c5305b4 commit d6fd6f7

File tree

7 files changed

+404
-34
lines changed

7 files changed

+404
-34
lines changed
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
name: Publish package to the Maven Central Repository
2+
23
on:
3-
workflow_dispatch:
4-
release:
5-
types: [ published ]
6-
push:
7-
tags: [ "*" ]
4+
release:
5+
types: [published] # 仅当正式发布 Release 时触发
6+
87
jobs:
98
publish:
109
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
1113
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Maven Central Repository
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
- name: Set up JDK 11 And Maven Central Repository
1417
uses: actions/setup-java@v2
1518
with:
1619
java-version: '11'
@@ -21,7 +24,7 @@ jobs:
2124
- id: install-secret-key
2225
name: Install gpg secret key
2326
run: |
24-
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
27+
cat <(echo "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
2528
gpg --list-secret-keys --keyid-format LONG
2629
- name: Publish package
2730
env:

.idea/encodings.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mosaic-agent/pom.xml

Lines changed: 118 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,31 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
5+
<groupId>io.github.timemachinelab</groupId>
6+
<artifactId>mosaic-agent</artifactId>
7+
<version>0.0.2-beta</version>
8+
<packaging>jar</packaging>
9+
<name>mosaic-agent</name>
10+
<description>
11+
Mosaic agent
12+
</description>
13+
14+
<url>
15+
https://github.com/Time-Machine-Lab/Mosaic
16+
</url>
17+
<licenses>
18+
<license>
19+
<name>The Apache Software License, Version 2.0</name>
20+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
21+
</license>
22+
</licenses>
523

624
<parent>
725
<groupId>io.github.tml</groupId>
826
<artifactId>Mosaic</artifactId>
927
<version>1.0-SNAPSHOT</version>
1028
</parent>
1129

12-
<artifactId>mosaic-agent</artifactId>
13-
<version>0.0.1-SNAPSHOT</version>
14-
<packaging>jar</packaging>
15-
1630
<properties>
1731
<maven.compiler.source>11</maven.compiler.source>
1832
<maven.compiler.target>11</maven.compiler.target>
@@ -43,8 +57,108 @@
4357
</dependency>
4458
</dependencies>
4559

60+
<developers>
61+
<developer>
62+
<id>ossrh</id>
63+
<name>TimeMachineLab</name>
64+
<email>TimeMachineLab@gmail.com</email>
65+
<roles>
66+
<role>Project Manager</role>
67+
<role>Developer</role>
68+
</roles>
69+
</developer>
70+
</developers>
71+
72+
<scm>
73+
<connection>https://github.com/Time-Machine-Lab/Mosaic.git</connection>
74+
<developerConnection>scm:git:ssh://git@github.com:Time-Machine-Lab/Mosaic.git</developerConnection>
75+
<url>https://github.com/Time-Machine-Lab/Mosaic#</url>
76+
</scm>
77+
4678
<build>
4779
<plugins>
80+
81+
<plugin>
82+
<groupId>org.apache.maven.plugins</groupId>
83+
<artifactId>maven-resources-plugin</artifactId>
84+
<version>3.2.0</version>
85+
<configuration>
86+
<encoding>UTF-8</encoding>
87+
<resources>
88+
<resource>
89+
<directory>src/main/resources</directory>
90+
<filtering>false</filtering>
91+
</resource>
92+
</resources>
93+
</configuration>
94+
</plugin>
95+
<!-- central发布插件 -->
96+
<plugin>
97+
<groupId>org.sonatype.central</groupId>
98+
<artifactId>central-publishing-maven-plugin</artifactId>
99+
<version>0.4.0</version>
100+
<extensions>true</extensions>
101+
<configuration>
102+
<publishingServerId>ossrh</publishingServerId>
103+
<tokenAuth>true</tokenAuth>
104+
</configuration>
105+
</plugin>
106+
<!-- source源码插件 -->
107+
<plugin>
108+
<groupId>org.apache.maven.plugins</groupId>
109+
<artifactId>maven-source-plugin</artifactId>
110+
<version>2.2.1</version>
111+
<executions>
112+
<execution>
113+
<id>attach-sources</id>
114+
<goals>
115+
<goal>jar-no-fork</goal>
116+
</goals>
117+
</execution>
118+
</executions>
119+
</plugin>
120+
<!-- javadoc插件 -->
121+
<plugin>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-javadoc-plugin</artifactId>
124+
<version>3.1.1</version>
125+
<configuration>
126+
<charset>UTF-8</charset>
127+
<encoding>UTF-8</encoding>
128+
<docencoding>UTF-8</docencoding>
129+
<additionalJOption>-Xdoclint:none</additionalJOption>
130+
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
131+
</configuration>
132+
<executions>
133+
<execution>
134+
<id>attach-javadocs</id>
135+
<goals>
136+
<goal>jar</goal>
137+
</goals>
138+
</execution>
139+
</executions>
140+
</plugin>
141+
<plugin>
142+
<groupId>org.apache.maven.plugins</groupId>
143+
<artifactId>maven-gpg-plugin</artifactId>
144+
<version>1.6</version>
145+
<configuration>
146+
<!--指定 GPG 执行程序的路径-->
147+
<executable>C:\Program Files (x86)\GnuPG\bin\gpg.exe</executable>
148+
<!--指定用于签名的 GPG 密钥名称。-->
149+
<keyname>TimeMachineLab</keyname>
150+
</configuration>
151+
<executions>
152+
<execution>
153+
<id>sign-artifacts</id>
154+
<phase>verify</phase>
155+
<goals>
156+
<goal>sign</goal>
157+
</goals>
158+
</execution>
159+
</executions>
160+
</plugin>
161+
48162
<plugin>
49163
<groupId>org.springframework.boot</groupId>
50164
<artifactId>spring-boot-maven-plugin</artifactId>

mosaic-core/pom.xml

Lines changed: 137 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6+
<groupId>io.github.timemachinelab</groupId>
7+
<artifactId>mosaic-core</artifactId>
8+
<version>0.0.2-beta</version>
9+
<packaging>jar</packaging>
10+
<name>mosaic-core</name>
11+
<description>
12+
Mosaic core
13+
</description>
14+
615
<parent>
716
<groupId>io.github.tml</groupId>
817
<artifactId>Mosaic</artifactId>
918
<version>1.0-SNAPSHOT</version>
1019
</parent>
1120

12-
<artifactId>mosaic-core</artifactId>
13-
<version>1.0-SNAPSHOT</version>
14-
<packaging>jar</packaging>
1521

1622
<properties>
1723
<maven.compiler.source>11</maven.compiler.source>
@@ -21,9 +27,9 @@
2127

2228
<dependencies>
2329
<dependency>
24-
<groupId>io.github.tml</groupId>
30+
<groupId>io.github.timemachinelab</groupId>
2531
<artifactId>mosaic-agent</artifactId>
26-
<version>0.0.1-SNAPSHOT</version>
32+
<version>0.0.2-beta</version>
2733
</dependency>
2834
<dependency>
2935
<groupId>com.github.javaparser</groupId>
@@ -52,6 +58,7 @@
5258
<dependency>
5359
<groupId>com.fasterxml.jackson.core</groupId>
5460
<artifactId>jackson-databind</artifactId>
61+
<version>2.11.3</version>
5562
</dependency>
5663

5764
<dependency>
@@ -66,4 +73,129 @@
6673
<version>1.33</version>
6774
</dependency>
6875
</dependencies>
76+
77+
<url>
78+
https://github.com/Time-Machine-Lab/Mosaic
79+
</url>
80+
<licenses>
81+
<license>
82+
<name>The Apache Software License, Version 2.0</name>
83+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
84+
</license>
85+
</licenses>
86+
87+
<distributionManagement>
88+
<snapshotRepository>
89+
<id>ossrh</id>
90+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
91+
</snapshotRepository>
92+
<repository>
93+
<id>ossrh</id>
94+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
95+
</repository>
96+
</distributionManagement>
97+
98+
<developers>
99+
<developer>
100+
<id>ossrh</id>
101+
<name>TimeMachineLab</name>
102+
<email>TimeMachineLab@gmail.com</email>
103+
<roles>
104+
<role>Project Manager</role>
105+
<role>Developer</role>
106+
</roles>
107+
</developer>
108+
</developers>
109+
110+
<scm>
111+
<connection>https://github.com/Time-Machine-Lab/Mosaic.git</connection>
112+
<developerConnection>scm:git:ssh://git@github.com:Time-Machine-Lab/Mosaic.git</developerConnection>
113+
<url>https://github.com/Time-Machine-Lab/Mosaic#</url>
114+
</scm>
115+
116+
<build>
117+
<plugins>
118+
<plugin>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-resources-plugin</artifactId>
121+
<version>3.2.0</version>
122+
<configuration>
123+
<encoding>UTF-8</encoding>
124+
<resources>
125+
<resource>
126+
<directory>src/main/resources</directory>
127+
<filtering>false</filtering>
128+
</resource>
129+
</resources>
130+
</configuration>
131+
</plugin>
132+
<!-- central发布插件 -->
133+
<plugin>
134+
<groupId>org.sonatype.central</groupId>
135+
<artifactId>central-publishing-maven-plugin</artifactId>
136+
<version>0.4.0</version>
137+
<extensions>true</extensions>
138+
<configuration>
139+
<publishingServerId>ossrh</publishingServerId>
140+
<tokenAuth>true</tokenAuth>
141+
</configuration>
142+
</plugin>
143+
<!-- source源码插件 -->
144+
<plugin>
145+
<groupId>org.apache.maven.plugins</groupId>
146+
<artifactId>maven-source-plugin</artifactId>
147+
<version>2.2.1</version>
148+
<executions>
149+
<execution>
150+
<id>attach-sources</id>
151+
<goals>
152+
<goal>jar-no-fork</goal>
153+
</goals>
154+
</execution>
155+
</executions>
156+
</plugin>
157+
<!-- javadoc插件 -->
158+
<plugin>
159+
<groupId>org.apache.maven.plugins</groupId>
160+
<artifactId>maven-javadoc-plugin</artifactId>
161+
<version>3.1.1</version>
162+
<configuration>
163+
<charset>UTF-8</charset>
164+
<encoding>UTF-8</encoding>
165+
<docencoding>UTF-8</docencoding>
166+
<additionalJOption>-Xdoclint:none</additionalJOption>
167+
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
168+
</configuration>
169+
<executions>
170+
<execution>
171+
<id>attach-javadocs</id>
172+
<goals>
173+
<goal>jar</goal>
174+
</goals>
175+
</execution>
176+
</executions>
177+
</plugin>
178+
<plugin>
179+
<groupId>org.apache.maven.plugins</groupId>
180+
<artifactId>maven-gpg-plugin</artifactId>
181+
<version>1.6</version>
182+
<configuration>
183+
<!--指定 GPG 执行程序的路径-->
184+
<executable>C:\Program Files (x86)\GnuPG\bin\gpg.exe</executable>
185+
<!--指定用于签名的 GPG 密钥名称。-->
186+
<keyname>TimeMachineLab</keyname>
187+
</configuration>
188+
<executions>
189+
<execution>
190+
<id>sign-artifacts</id>
191+
<phase>verify</phase>
192+
<goals>
193+
<goal>sign</goal>
194+
</goals>
195+
</execution>
196+
</executions>
197+
</plugin>
198+
</plugins>
199+
</build>
200+
69201
</project>

0 commit comments

Comments
 (0)