Skip to content

Commit a9951ca

Browse files
committed
update release workflow
1 parent dd428d1 commit a9951ca

File tree

3 files changed

+51
-17
lines changed

3 files changed

+51
-17
lines changed

.bumpversion.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[bumpversion]
2+
current_version = 6.0.1-SNAPSHOT
3+
commit = True
4+
tag = True
5+
tag_name = v{new_version}
6+
7+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-SNAPSHOT)?
8+
9+
serialize =
10+
{major}.{minor}.{patch}-SNAPSHOT
11+
12+
[bumpversion:file:pom.xml]
13+
search = <version>{current_version}</version>
14+
replace = <version>{new_version}</version>

.github/ISSUE_TEMPLATE/new_release.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,24 @@ body:
1919
Fixed some minor things, added some minor features...(full list https://github.com/git-commit-id/git-commit-id-plugin-core//issues?q=milestone%3A6.0.0-rc.2).
2020
2121
# Release-Guide
22-
see http://central.sonatype.org/pages/ossrh-guide.html
22+
see
23+
- https://central.sonatype.org/publish/publish-guide
24+
- https://central.sonatype.org/publish/publish-portal-maven/
25+
- (OSSRH was deprecated on June 30, 2025 -- http://central.sonatype.org/pages/ossrh-guide.html)
26+
27+
The release process has changed from the old OSSRH staging to the new Central Portal:
28+
- Option 1: Use the new central-publishing-maven-plugin (recommended for automated releases)
29+
- Option 2: Use the OSSRH Staging API Service (compatibility layer)
2330
24-
- [ ] verify that `~/.m2/settings.xml` exists and contains username/password which is required as per https://central.sonatype.org/publish/publish-maven/#distribution-management-and-authentication
25-
- [ ] `mvn release:prepare`
26-
[INFO] Checking dependencies and plugins for snapshots ...
27-
What is the release version for "Git Commit Id Plugin Core"? (io.github.git-commit-id:git-commit-id-plugin-core) **6.0.0**: : [ENTER]
28-
What is SCM release tag or label for "Git Commit Id Plugin Core"? (io.github.git-commit-id:git-commit-id-plugin-core) git-commit-id-plugin-core-6.0.0: : **v6.0.0** [ENTER]
29-
What is the new development version for "Git Commit Id Plugin Core"? (io.github.git-commit-id:git-commit-id-plugin-core) **6.0.1-SNAPSHOT**: : [ENTER]
31+
- [ ] verify that `~/.m2/settings.xml` exists (https://central.sonatype.org/publish/publish-portal-maven/#credentials)
32+
- contains user token credentials from https://central.sonatype.com/ (generate token at https://central.sonatype.org/publish/generate-portal-token/)
33+
- [ ] Set release version: `bump2version --new-version 6.0.1 release --dry-run --verbose`
34+
- [ ] Push changes and tag: `git push origin master --follow-tags`
3035
- [ ] wait for github actions to pass
31-
- [ ] `mvn release:perform`
32-
- (or `mvn clean source:jar javadoc:jar deploy -Pgpg` from the git tag)
33-
- (or `mvn release:perform -Dresume=false`)
34-
- Note: If the uploading of the artifacts fails, ensure that a [`settings.xml`](https://github.com/git-commit-id/git-commit-id-maven-plugin/blob/master/.buildscript/settings.xml) exists under the local `.m2`-Folder
35-
- [ ] then go to https://s01.oss.sonatype.org/ log in there and go to the staging repositories, there will be the plugin, you have to first close and then release it if validation passed.
36+
- [ ] `mvn clean deploy -Pgpg`
3637
- [ ] verify plugin is available on (might take some time) https://repo1.maven.org/maven2/io/github/git-commit-id/git-commit-id-plugin-core/
38+
- [ ] Set next development version: `bump2version patch --dry-run --verbose`
39+
- [ ] Push snapshot version: `git push origin master`
3740
- [ ] under [Milestones](https://github.com/git-commit-id/git-commit-id-plugin-core/milestones) close old milestone
3841
- [ ] under [Milestones](https://github.com/git-commit-id/git-commit-id-plugin-core/milestones) create new milestone for new version
3942
- [ ] under [Releases](https://github.com/git-commit-id/git-commit-id-plugin-core/releases) publish Release-Notes

pom.xml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<groupId>io.github.git-commit-id</groupId>
1111
<artifactId>git-commit-id-plugin-core</artifactId>
1212
<packaging>jar</packaging>
13-
<version> 6.0.1-SNAPSHOT</version>
13+
<version>6.0.1-SNAPSHOT</version>
1414
<name>Git Commit Id Plugin Core</name>
1515
<url>https://github.com/git-commit-id/git-commit-id-plugin-core</url>
1616

@@ -101,6 +101,12 @@
101101
<groupId>org.apache.maven.plugins</groupId>
102102
<artifactId>maven-gpg-plugin</artifactId>
103103
<version>3.2.8</version>
104+
<configuration>
105+
<gpgArguments>
106+
<arg>--pinentry-mode</arg>
107+
<arg>loopback</arg>
108+
</gpgArguments>
109+
</configuration>
104110
</plugin>
105111
<plugin>
106112
<groupId>org.apache.maven.plugins</groupId>
@@ -132,6 +138,17 @@
132138
<artifactId>maven-install-plugin</artifactId>
133139
<version>3.1.4</version>
134140
</plugin>
141+
<plugin>
142+
<groupId>org.sonatype.central</groupId>
143+
<artifactId>central-publishing-maven-plugin</artifactId>
144+
<version>0.10.0</version>
145+
<extensions>true</extensions>
146+
<configuration>
147+
<publishingServerId>central</publishingServerId>
148+
<autoPublish>true</autoPublish>
149+
<waitUntil>published</waitUntil>
150+
</configuration>
151+
</plugin>
135152
<plugin>
136153
<groupId>org.apache.maven.plugins</groupId>
137154
<artifactId>maven-deploy-plugin</artifactId>
@@ -300,12 +317,12 @@
300317

301318
<distributionManagement>
302319
<snapshotRepository>
303-
<id>ossrh</id>
304-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
320+
<id>central</id>
321+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
305322
</snapshotRepository>
306323
<repository>
307-
<id>ossrh</id>
308-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
324+
<id>central</id>
325+
<url>https://central.sonatype.com/repository/maven-releases/</url>
309326
</repository>
310327
</distributionManagement>
311328

0 commit comments

Comments
 (0)