release.adoc 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. = Engine Release Guide
  2. :revnumber: 1.0
  3. :revdate: 2021/04/15
  4. == Audience
  5. This documentation page is intended for JMonkeyEngine release managers.
  6. == Repo and Branches
  7. Authoritative source code for the Engine
  8. lives in a public repository at GitHub.
  9. The repo's homepage is at
  10. https://github.com/jMonkeyEngine/jmonkeyengine
  11. The default branch in the public repo is named "master".
  12. That's where the leading-edge code is kept.
  13. All incoming pull requests should be integrated to "master".
  14. The other branches in the repo fall into 2 categories:
  15. . _release branches_, used to develop stable releases, and
  16. . _development branches_,
  17. used to develop features or fixes that involve multiple commits.
  18. Release branch names, such as "v3.2" and "v3.3", refer to release numbers.
  19. Development branches should have descriptive names, such as "opengles2-fixes".
  20. == Continuous Integration
  21. Every push to "master" causes a continuous-integration (CI)
  22. workflow to run at GitHub Actions.
  23. The workflow is defined by
  24. https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/.github/workflows/main.yml[the "main.yml" script].
  25. It performs clean builds of the Engine
  26. across a matrix of 3 operating systems and 3 Java versions.
  27. It also performs a clean build of the merged javadoc.
  28. Any failure of the CI workflow causes notifications to be sent.
  29. To register for notifications, follow the instructions at
  30. https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/configuring-notifications
  31. Every step in the workflow generates a detailed log,
  32. which can be browsed via the web interface.
  33. Often the cause of a CI failure
  34. can be deduced from the log of the first failed step.
  35. [TIP]
  36. ====
  37. GitHub provides an easy way to determine whether CI is failing.
  38. Browse to https://github.com/jMonkeyEngine/jmonkeyengine/commits/master
  39. and look for colored icons to the right of the dates of recent push commits.
  40. image::github/colored_icons.png[colored_icons.png]
  41. * A green checkmark indicates a successful CI run.
  42. * An amber disc indicates a CI run in progress.
  43. * A red X indicates a failed CI run.
  44. Selecting a colored icon causes a list of jobs ("checks") to pop up.
  45. Select the "Details" link after a job description
  46. to access detailed information about that job.
  47. ====
  48. Sometimes CI fails due to transient networking issues.
  49. In this case, someone with the necessary privileges should retry the failed run
  50. by clicking on the "Re-run jobs" button on the summary page of the run.
  51. To reach the summary page,
  52. browse to https://github.com/jMonkeyEngine/jmonkeyengine/actions
  53. and select on the failed run from the displayed list.
  54. image::github/rerun.png[rerun.png]
  55. Breakage (persistent CI failures) of the "master" branch
  56. should be addressed promptly.
  57. When "master" is broken, *no* commits should be integrated
  58. except those intended to diagnose or repair the breakage.
  59. Additional information about Engine development and integration may be found in
  60. https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/CONTRIBUTING.md[the "CONTRIBUTING.md" file].
  61. == Release Naming
  62. Official engine releases fall into 3 categories:
  63. * Alpha releases are "pre-release" builds intended only for internal testing.
  64. * Beta releases are "pre-release" builds intended for broader testing.
  65. * Stable releases are fully tested builds suitable for production use.
  66. The name of an Engine release is precisely
  67. the "version" portion of its Maven coordinates
  68. (<groupId>:<artifactId>:<version>).
  69. The name will always begin with a digit, currently "3".
  70. For extra clarity, the letter "v" (for "version")
  71. is prepended in some contexts.
  72. Thus "v3.2.4-stable" and "3.2.4-stable" both refer to the same release.
  73. WARNING: To avoid confusion, release names should *never* be re-used.
  74. Names for stable releases should end with the "-stable" suffix.
  75. For instance, the first stable release from the "v3.2" branch
  76. was named "3.2.0-stable".
  77. Patch (or "dot-dot" releases) are stable releases that don't introduce
  78. any new features.
  79. For instance, the first patch release
  80. after "3.2.0-stable" was named "3.2.1-stable".
  81. Like its predecessor, it was released from the "v3.2" branch.
  82. Names for alpha and beta releases should use "-alpha" or "-beta"
  83. and a sequentially assigned numeric ID in place of "-stable".
  84. For instance, the first alpha release leading up to "3.3.0-stable"
  85. was named "3.3.0-alpha1".
  86. TIP: To prevent interference between releases and ongoing development,
  87. beta releases and stable releases should be built *only* from release branches,
  88. never from "master".
  89. == Initiating a New Release
  90. The release process starts with the creation of a Git tag.
  91. *Do not* use the `git push` command for this purpose!
  92. Use GitHub's web interface instead:
  93. Browse to https://github.com/jMonkeyEngine/jmonkeyengine/releases/new
  94. and fill out the new-release web form,
  95. paying special attention to the target branch.
  96. The target branch defaults to "master",
  97. but more often you'll want to specify a release branch as the target.
  98. image::github/new_release.png[new_release.png]
  99. For the tag version, specify "v" followed by the version name.
  100. This determines the name of the Git tag that will be created.
  101. For the release title, specify "jMonkeyEngine " followed by the version name.
  102. This field can be added or edited later.
  103. For the description, write something brief.
  104. Like the title, this field can be added or edited later.
  105. For an alpha or beta release, tick the "This is a pre-release" checkbox.
  106. This helps ensure that naive users are steered toward a stable release.
  107. CAUTION: Double-check the target branch before proceeding. Then triple-check it!
  108. To start the process,
  109. click on the green "Publish release" button at the bottom of the page.
  110. == Monitoring the Release Run
  111. A release run takes 15-30 minutes, depending how busy GitHub's server farm is.
  112. Discord provides an easy way to verify that the run has begun.
  113. (A Discord client is not required.)
  114. * Log in to your Discord account.
  115. * Select the "github-builds" channel on the "jMonkeyEngine Community" server.
  116. * Look for a recent message from the "GitHub" bot saying
  117. "[jMonkeyEngine/jmonkeyengine] New release published".
  118. This indicates that a run has started, not that it's complete!
  119. image::release_published.png[release_published.png]
  120. You can monitor its progress in the "github-builds" channel,
  121. where you will see job messages from the GitHub bot,
  122. such as "[jmonkeyengine] Build natives for android success".
  123. Each job message is linked to the GitHub webpage for that job.
  124. From any GitHub job page, select the "Summary" link
  125. to see a graphical summary of the run which contains the job.
  126. image::github/summary.png[summary.png]
  127. == Results of the Release Run
  128. A successful release run automatically deploys various build products:
  129. * It deploys the merged javadoc to https://javadoc.jmonkeyengine.org/
  130. * It deploys the test chooser's executable (a ZIP file)
  131. as an asset listed under the release description at GitHub Releases.
  132. * It also "stages" the signed Maven artifacts to Sonatype, as a "repository".
  133. However, staging to Sonatype does not make the artifacts publicly visible.
  134. For that to happen,
  135. the staging repository must be closed and synched.
  136. == Managing Repos at Sonatype
  137. The official instructions are available from
  138. https://central.sonatype.org/publish/release/
  139. Browse to https://s01.oss.sonatype.org/[the Nexus Repository Manager].
  140. Select the "Log in" link in the upper right corner of the page.
  141. image::sonatype/login.png[login.png]
  142. Type your Sonatype credentials into the dialog box
  143. and click on the "Log In" button below.
  144. image::sonatype/login_dialog.png[login_dialog.png]
  145. Under "Build Promotion" on the left sidebar,
  146. select "Staging Repositories".
  147. image::sonatype/sidebar.png[sidebar.png]
  148. If you don't see a freshly updated repo named "orgjmonkeyengine",
  149. click on the "Refresh" button occasionally until its record appears.
  150. image::sonatype/refresh.png[refresh.png]
  151. Select the newly staged repo by ticking the checkbox to the left of its record.
  152. image::sonatype/select_repo.png[select_repo.png]
  153. In the bottom half of the page,
  154. select the "Content" tab to browse the contents of newly staged repo.
  155. image::sonatype/content.png[content.png]
  156. When satisfied that the staged repo is 100% complete,
  157. click on the "Close" button and then the "Confirm" button
  158. to begin the automated validation process.
  159. image::sonatype/close.png[close.png]
  160. Click on the "Refresh" button again.
  161. In the bottom half of the page,
  162. select the "Activity" tab to watch the progress.
  163. Click on the "Refresh" button occasionally
  164. until a "Repository closed" message appears in the progress.
  165. image::sonatype/repo_closed.png[repo_closed.png]
  166. Once the repository is closed, its artifacts become publicly
  167. visble at SonaType, but they aren't yet synched
  168. to Maven Central.
  169. This is your last opportunity to test the proposed release,
  170. using (for example)
  171. [source,groovy]
  172. ----
  173. repositories {
  174. maven { url 'https://s01.oss.sonatype.org/content/groups/staging' }
  175. mavenCentral()
  176. }
  177. ----
  178. If the staged artifacts don't work for some reason, drop them,
  179. address the issue(s), and start over with a new release name.
  180. To begin the synching process,
  181. click on the "Release" button and then the "Confirm" button.
  182. The process usually takes about 20 minutes.
  183. I don't know a good way to monitor this process.
  184. To detect completion, browse to
  185. https://repo1.maven.org/maven2/org/jmonkeyengine/jme3-core/
  186. and refresh the web browser until the new folder appears.
  187. Allow an additional hour or two for the new release to show up
  188. on https://search.maven.org[Maven Central Repository Search].
  189. == Follow-up Tasks
  190. If the release description at GitHub is incomplete,
  191. go back and flesh it out.
  192. Announce the new release at https://hub.jmonkeyengine.org/[the Forum].
  193. For an important release, post an announcement
  194. to https://jmonkeyengine.org/tags/blog/[the Blog].