Skip to content
This repository was archived by the owner on Oct 24, 2020. It is now read-only.

Commit 93bc3d8

Browse files
authored
Use maven-release-plugin (#29)
1 parent ba477fb commit 93bc3d8

File tree

2 files changed

+20
-48
lines changed

2 files changed

+20
-48
lines changed

RELEASE_OPERATIONS.md

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,18 @@
11
# Release Operations
22

3-
## Set the release version
3+
## Update the release version
44

5-
Run the Maven `version:set` goal:
5+
Run the Maven `release:prepare` goal:
66

77
```
88
$ git checkout master
99
$ git pull
10-
$ ./mvnw versions:set
10+
$ ./mvnw --batch-mode -DdryRun=true -DreleaseVersion=1.0.0 -DdevelopmentVersion=999-SNAPSHOT release:clean release:prepare
1111
```
1212

13-
After success, run the Maven `version:commit` goal:
13+
The value of `releaseVersion` is decided by the draft name of
14+
[Releases](https://github.com/domaframework/doma-quarkus/releases).
1415

15-
```
16-
$ ./mvnw versions:commit
17-
```
18-
19-
Modify versions in README.md.
20-
21-
Commit the release version:
22-
23-
```
24-
$ git add --all
25-
$ git commit -m "Release v1.0.0"
26-
```
27-
28-
## Push to the master branch
29-
30-
Create a tag and push the commit and the tag:
31-
32-
```
33-
$ git tag -a v1.0.0 -m "v1.0.0"
34-
$ git push origin master --tags
35-
```
3616

3717
## Build with GitHub Action
3818

@@ -41,7 +21,7 @@ The GitHub Action workflow [Java CI with Maven](.github/workflows/ci.yml) handle
4121
The workflow builds the "doma-quarkus-parent", the "doma-quarkus-deployment" and the "doma-quarkus" artifacts
4222
and pushes them to Maven Central[Sonatype OSSRH](https://central.sonatype.org/pages/ossrh-guide.html).
4323

44-
## Publish artifacts to Maven Central from Sonatype OSSRH
24+
## Publish artifacts to Maven Central
4525

4626
Follow the instructions below:
4727

@@ -58,29 +38,11 @@ In a few minutes, all artifacts are copied to the [Maven Central Repository](htt
5838
Open [Releases](https://github.com/domaframework/doma-quarkus/releases)
5939
and publish release notes.
6040

41+
## Update README.md.
42+
43+
Modify version numbers.
44+
6145
## Announce the release
6246

6347
Announce the release of new version using Twitter.
6448
- [@domaframework](https://twitter.com/domaframework)
65-
66-
## Set the next version
67-
68-
Run the Maven `version:set` goal:
69-
70-
```
71-
$ ./mvnw versions:set
72-
```
73-
74-
After success, run the Maven `version:commit` goal:
75-
76-
```
77-
$ ./mvnw versions:commit
78-
```
79-
80-
Commit and push the next version:
81-
82-
```
83-
$ git add --all
84-
$ git commit -m "Next version [skip ci]"
85-
$ git push origin master
86-
```

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<gpg-plugin.version>1.6</gpg-plugin.version>
4747
<versions-plugin.version>2.8.1</versions-plugin.version>
4848
<nexus-staging-plugin.version>1.6.8</nexus-staging-plugin.version>
49+
<release-plugin.version>3.0.0-M1</release-plugin.version>
4950
</properties>
5051

5152
<modules>
@@ -165,6 +166,15 @@
165166
<artifactId>maven-compiler-plugin</artifactId>
166167
<version>${compiler-plugin.version}</version>
167168
</plugin>
169+
<plugin>
170+
<groupId>org.apache.maven.plugins</groupId>
171+
<artifactId>maven-release-plugin</artifactId>
172+
<version>${release-plugin.version}</version>
173+
<configuration>
174+
<autoVersionSubmodules>true</autoVersionSubmodules>
175+
<tagNameFormat>v@{project.version}</tagNameFormat>
176+
</configuration>
177+
</plugin>
168178
<plugin>
169179
<groupId>org.codehaus.mojo</groupId>
170180
<artifactId>versions-maven-plugin</artifactId>

0 commit comments

Comments
 (0)