@@ -232,4 +232,87 @@ otherwise they would be overwritten upon the next generated release. Feel free t
232232a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
233233an issue first to discuss with us!
234234
235- On the other hand, contributions to the README are always very welcome!
235+ On the other hand, contributions to the README are always very welcome!
236+
237+ ## For Maintainers
238+
239+ ### Regenerating the SDK
240+
241+ This SDK is generated using [ Fern] ( https://buildwithfern.com ) . To regenerate the SDK after API changes:
242+
243+ #### Prerequisites
244+
245+ - Ensure you have Fern CLI installed
246+ - Navigate to the ` fern/ ` directory of the Fern config repo
247+ - If you only need regeneration without publishing, you can empty credentials in ` generators.yml ` to skip the publish step:
248+ ``` yaml
249+ # Example: Clear Maven credentials to skip publish
250+ username : " "
251+ password : " "
252+ signing-key-id : " "
253+ ` ` `
254+
255+ #### Regeneration Command
256+
257+ ` ` ` bash
258+ fern generate --group java-sdk
259+ ```
260+
261+ #### Common Issues
262+
263+ - ** Integration tests failing** : Fix the tests locally and push updates to the PR branch
264+ - ** Spotless formatting errors** : Run the Spotless formatter locally to fix formatting issues
265+ - ** Maven signing errors** : If publishing is enabled, ensure these environment variables are set:
266+ - ` MAVEN_SIGNING_KEY_ID `
267+ - ` MAVEN_SIGNING_KEY `
268+ - ` MAVEN_SIGNING_PASSWORD `
269+ - ** GitHub Actions delays** : If CI is degraded, pipelines may need retries
270+
271+ ### Publishing to Maven Central
272+
273+ After regenerating the SDK and merging the PR:
274+
275+ #### 1. Create a Release Tag
276+
277+ Manually create and push a Git tag for the release:
278+
279+ ``` bash
280+ git tag v4.0.x
281+ git push origin v4.0.x
282+ ```
283+
284+ #### 2. Trigger Publish Workflow
285+
286+ The tag push triggers the publish workflow automatically. Ensure the version in the repo config aligns with the intended release.
287+
288+ #### 3. Verify Publication
289+
290+ - Check [ Maven Central] ( https://central.sonatype.com/artifact/io.intercom/intercom-java/overview ) for the new version
291+ - Note: Maven Central indexing can take some time to appear
292+
293+ #### Required Credentials
294+
295+ Publishing requires:
296+ - Maven Central credentials (username/password)
297+ - GPG signing key configuration:
298+ - ` MAVEN_SIGNING_KEY_ID `
299+ - ` MAVEN_SIGNING_KEY `
300+ - ` MAVEN_SIGNING_PASSWORD `
301+
302+ Contributors without publish credentials can open regeneration PRs. Team members with credentials can complete the publish steps.
303+
304+ ### Example Workflow
305+
306+ 1 . ** Update OpenAPI spec** (if needed): Add overrides in ` openapi-overrides.yml ` in the Intercom-OpenAPI repo
307+ 2 . ** Regenerate SDK** : Run ` fern generate --group java-sdk `
308+ 3 . ** Fix any issues** : Address integration test failures or formatting issues
309+ 4 . ** Create PR** : Open a pull request with the regenerated code
310+ 5 . ** Merge PR** : After review and approval
311+ 6 . ** Tag release** : Create and push a Git tag
312+ 7 . ** Verify publish** : Check Maven Central for the new version
313+
314+ ### Related Resources
315+
316+ - [ Fern Documentation] ( https://buildwithfern.com )
317+ - [ Maven Central Repository] ( https://central.sonatype.com/artifact/io.intercom/intercom-java )
318+ - [ Intercom OpenAPI Spec] ( https://github.com/intercom/Intercom-OpenAPI )
0 commit comments