Skip to content

Latest commit

 

History

History
88 lines (71 loc) · 3.45 KB

RELEASING.md

File metadata and controls

88 lines (71 loc) · 3.45 KB

Releasing RE2/J to Maven Central

This document describes the process for releasing RE2/J binary artifacts to Maven Central and to the RE2/J GitHub site.

Prerequisites

You must have:

  • git
  • Apache Maven, at least version 3.0.3
  • an account on OSSRH, see the initial setup section of the OSSRH guide
  • access to the com.google.re2 OSSRH repository. For this, you should request access by filing a JIRA ticket with the OSSRH folks
  • the following $HOME/.m2/settings.xml file:
<settings>
  <servers>
    <server>
      <id>sonatype-nexus-staging</id>
      <username>YourOssrhUsername</username>
      <password>YourOssrhPassword</password>
    </server>
  </servers>
</settings>

Making the release

In a shell, change into the RE2/J source code root directory (the one containing pom.xml), and then run

mvn release:clean
mvn release:prepare
mvn release:perform

You may be asked for your GitHub credentials several times. If your account uses two-factor authentication (2FA), then you will need to generate a temporary access token and then use that access token in place of your normal password. You may delete the access token from your account once the release is done.

Once you've done these steps, you'll have to login to OSSRH (look for the Log-In button in the top-right). Once you are logged in, follow these steps:

  • click on "Staging Repositories"
  • locate the repository that was created for you when you ran mvn release:perform. It will contain re2j in its name
  • click the checkbox near the repository's name, then click "Close" in the top menubar
  • OSSRH will perform some validation on the repository. You may need to hit the refresh button a few times before you see the repository enter the "closed" state. Once this happens, make sure the repository is checked, then click "Release". For the comment, enter "RE2/J release 1.0" (replace "1.0" with the actual release number)

At this point, the release will be synced to Maven Central within a few minutes. You can take this time to update the Maven XML snippet on the RE2/J GitHub page to mention the new release number.

Some people don't use Maven, so we can upload binaries to the GitHub site for manual download. To do this, follow the instructions for creating releases. For the Git tag, use the tag that was created as a result of the mvn release:prepare command that you ran earlier.

Before you publish the release, attach the following binaries to the release:

  • target/re2j-(releaseNumber).jar
  • target/re2j-(releaseNumber)-javadoc.jar
  • target/re2j-(releaseNumber)-sources.jar

Once you publish this release, the process is complete!

Problems

If you encounter issues, please reach out to the mailing list at [email protected].