Skip to content

Commit ac9bd03

Browse files
authored
Merge pull request #49 from domaframework/how-to-release
Add how to release
2 parents 1e43732 + 9bc9c96 commit ac9bd03

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed

how-to-release.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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+
65+
## Update doma-spring-boot-demo
66+
67+
Update pom.xml of [doma-spring-boot-demo](https://github.com/backpaper0/doma-spring-boot-demo) to set a new version of doma-spring-boot.
68+
69+
Note: doma-spring-boot-demo is a personal repository for backpaper0.
70+
71+
## Prepare a next SNAPSHOT version
72+
73+
First, pull the master branch.
74+
75+
```
76+
git switch master
77+
git pull
78+
```
79+
80+
Create a new branch.
81+
82+
```
83+
git switch -c prepare-next-snapshot-version
84+
```
85+
86+
Set a next SNAPSHOT version to pom.xml and commit.
87+
88+
```
89+
./mvnw versions:set -DnewVersion=x.z.z-SNAPSHOT
90+
./mvnw versions:commit
91+
```
92+
93+
Do `git commit` and push to GitHub.
94+
95+
```
96+
git add .
97+
git commit -m "Prepare a next SNAPSHOT version"
98+
git push origin master
99+
```
100+
101+
Finally, create a new PR and merge it into the master branch.
102+

0 commit comments

Comments
 (0)