Skip to content

Commit 54169d5

Browse files
committed
Document release process in CONTRIBUTING
Signed-off-by: Marvin Froeder <velo.br@gmail.com>
1 parent 1e3c55e commit 54169d5

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,62 @@ docs/
7575
2. Make your changes and add tests where appropriate.
7676
3. Run `./mvnw -Pdev verify` to make sure tests pass.
7777
4. Open a pull request against `master`.
78+
79+
## Releasing
80+
81+
Releases are cut with the `scripts/release.sh` helper. **Never create a release
82+
tag by hand** — manual tagging is how a release ends up pointing at a
83+
`-SNAPSHOT` pom, which CircleCI happily builds while `central-publishing`
84+
silently skips the upload (a green build that publishes nothing to Maven
85+
Central).
86+
87+
### Prerequisites
88+
89+
- A clean working tree on the branch you are releasing (usually `master`).
90+
- The pom version is the `-SNAPSHOT` you intend to release. The release version
91+
is derived by stripping `-SNAPSHOT`, so set it deliberately beforehand:
92+
- `7.3-SNAPSHOT` → releases `7.3`
93+
- `7.3.0-SNAPSHOT` → releases `7.3.0`
94+
95+
### Cut the release
96+
97+
```bash
98+
./scripts/release.sh
99+
```
100+
101+
The script:
102+
103+
1. Reads `project.version` and strips `-SNAPSHOT` to get the release version.
104+
2. Runs `versions:set -DremoveSnapshot` across all modules and commits
105+
`prepare release <version>`, then tags that commit.
106+
3. Bumps the poms to the next development iteration (`<next>-SNAPSHOT`) and
107+
commits `[ci skip] updating versions to next development iteration`.
108+
109+
Because the version bump happens *before* the tag, the tag always points at a
110+
non-SNAPSHOT pom.
111+
112+
### Push
113+
114+
The script keeps the changes local (`-DpushChanges=false`). Review, then push —
115+
**pushing the tag is what triggers the release**:
116+
117+
```bash
118+
git log --oneline -3 # confirm the two commits and the new tag
119+
git push origin master # the prepare-release + next-snapshot commits
120+
git push origin <tag> # e.g. git push origin 7.3 — triggers deployRelease on CircleCI
121+
```
122+
123+
### Verify it actually published
124+
125+
A green CircleCI job is not proof — confirm all three:
126+
127+
```bash
128+
# 1. The tagged commit must NOT be a snapshot
129+
git show <tag>:pom.xml | grep -m1 '<version>' # must not contain -SNAPSHOT
130+
131+
# 2. Watch the release workflow to green
132+
# https://app.circleci.com/pipelines/gh/OpenFeign/querydsl
133+
134+
# 3. Confirm artifacts landed (allow a few minutes for indexing)
135+
# https://central.sonatype.com/artifact/io.github.openfeign.querydsl/querydsl-core
136+
```

0 commit comments

Comments
 (0)