Skip to content

Commit 0cba65e

Browse files
committed
Add how to release
1 parent 1e43732 commit 0cba65e

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

how-to-release.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# How to release
2+
3+
## Create release branch
4+
5+
Switch to a new branch to work on the release.
6+
7+
```
8+
git switch -c release-x.y.z
9+
```
10+
11+
## Update README
12+
13+
Update the version described in the README.
14+
15+
The following example shows the command to update the description from 1.3.0 to 1.4.0.
16+
17+
```
18+
sed -i '' -e 's/1\.3\.0/1\.4\.0/g' README.md
19+
```
20+
21+
## Set a new version
22+
23+
Update pom.xml by Maven Versions Plugin.
24+
25+
```
26+
./mvnw versions:set -DnewVersion=x.y.z
27+
```
28+
29+
Run all tests.
30+
31+
```
32+
./mvnw test
33+
```
34+
35+
Commit the new version.
36+
37+
```
38+
./mvnw versions:commit
39+
```
40+
41+
## Push changes to GitHub
42+
43+
Do `git commit` changes to the README and pom.xml.
44+
45+
```
46+
git add .
47+
git commit -m "Release x.y.z"
48+
```
49+
50+
And do `git push` to GitHub.
51+
52+
```
53+
git push origin release-x.y.z
54+
```
55+
56+
## Do release work on GitHub
57+
58+
Create a new PR from release branch and merge it into the master branch.
59+
60+
The CI job running after the merge releases a new version artifact to the Maven Central Repository.
61+
62+
Check https://repo.maven.apache.org/maven2/org/seasar/doma/boot/doma-spring-boot/ .
63+
64+
## Prepare a next SNAPSHOT version
65+
66+
First, pull the master branch.
67+
68+
```
69+
git switch master
70+
git pull
71+
```
72+
73+
Create a new branch.
74+
75+
```
76+
git switch -c prepare-next-snapshot-version
77+
```
78+
79+
Set a next SNAPSHOT version to pom.xml and commit.
80+
81+
```
82+
./mvnw versions:set -DnewVersion=x.z.z-SNAPSHOT
83+
./mvnw versions:commit
84+
```
85+
86+
Do `git commit` and push to GitHub.
87+
88+
```
89+
git add .
90+
git commit -m "Prepare a next SNAPSHOT version"
91+
git push origin master
92+
```
93+
94+
Finally, create a new PR and merge it into the master branch.
95+

0 commit comments

Comments
 (0)