You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-9
Original file line number
Diff line number
Diff line change
@@ -157,20 +157,56 @@ To enforce code style and formatting rules, run the Maven Spotless plugin:
157
157
mvn spotless:apply
158
158
```
159
159
160
-
## Release
160
+
## Release Process
161
161
162
-
1. Tag the commit according to the [semantic versioning](https://semver.org/).
162
+
### Step 1 - Create a Release Pull Request
163
163
164
-
1. Bump version in `pom.xml`.
164
+
#### Step 1.a - Generate a JSON Web Token (JWT)
165
165
166
-
1. Run the following commands:
166
+
To initiate the release process, start by generating a JSON Web Token (JWT) using one of the provided scripts in [Generate a JSON Web Token (JWT)](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app). Ensure to specify the path where the `developer-experience-bot` private key is stored (can be found in password manager).
167
167
168
-
1.`mvn -P release clean deploy`.
168
+
#### Step 1.b - Obtain an Access Token
169
169
170
-
1.`cd ./target`.
170
+
Next, obtain an access token by executing the following command, replacing `<JSON_TOKEN>` and `<RELEASER_INSTALLATION_ID>` with the JWT token created in the previous step and the respective releaser installation id.
Using the access token generated in the previous step, create a release Pull Request. This PR will automatically include the appropriate version bump and update the changelog. Initially, run the command with the `--dry-run` flag to ensure the PR is created with the correct version.
182
+
183
+
```bash
184
+
release-please release-pr \
185
+
--token=<ACCESS_TOKEN> \
186
+
--repo-url=coveo/push-api-client.java \
187
+
--release-type=maven \
188
+
--target-branch=main \
189
+
```
190
+
191
+
In case the command creates a pull request with an incorrect tag, manually create a pull request and perform an empty commit as follows:
This action will prompt `release-please` to bump to the desired version on the next run. Finally, merge the pull request and repeat Step 1.c.
198
+
199
+
### Step 2 - Tag the Commit
200
+
201
+
1. Tag the commit according to [semantic versioning](https://semver.org/) principles.
202
+
203
+
```bash
204
+
git tag -a vx.x.x <COMMIT_SHA> -m "chore(main): release x.x.x (#<PULL_REQUEST_NUMBER>)"
205
+
git push --tags
206
+
```
207
+
208
+
2. Merge the Pull Request.
173
209
174
-
1. Log in to https://oss.sonatype.org/.
210
+
### Step 3 - Manually Create a Release
175
211
176
-
1. Upload the newly created `bundle.jar` file.
212
+
Lastly, manually create a release on the [GitHub repository](https://github.com/coveo/push-api-client.java/releases). This action will trigger the package deploy workflow action.
0 commit comments