Skip to content

Commit f4624ec

Browse files
committed
Udpate releasing information
1 parent d4294d0 commit f4624ec

1 file changed

Lines changed: 77 additions & 33 deletions

File tree

RELEASING.md

Lines changed: 77 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,97 @@
22

33
## Prerequisites
44

5-
### Setup OSSRH and Signing
5+
### Setup Maven Central Portal Publishing
66

7-
If you haven't deployed artifacts to Maven Central before, you need to set up
8-
your OSSRH (OSS Repository Hosting) account and signing keys.
7+
> [!IMPORTANT]
8+
> The OSSRH service will reach the end-of-life sunset date on June 30th, 2025.
9+
> After this, it is recommended to only use Sonatype's Central Publisher Portal
10+
> to publish artifacts to Maven Central. See
11+
> [the official notice](https://central.sonatype.org/news/20250326_ossrh_sunset/)
12+
> for more details.
13+
14+
If you do not have a Central Portal account on Sonatype, you need to set up your
15+
account to publish via the Central Portal.
916

1017
- Follow the instructions on [this
11-
page](http://central.sonatype.org/pages/ossrh-guide.html) to set up an account
12-
with OSSRH.
13-
- You only need to create the account, not set up a new project
14-
- Contact an OpenTelemetry Operations Java maintainer to add your account
15-
after you have created it.
16-
- (For release deployment only) [Install
17-
GnuPG](http://central.sonatype.org/pages/working-with-pgp-signatures.html#installing-gnupg)
18-
and [generate your key
19-
pair](http://central.sonatype.org/pages/working-with-pgp-signatures.html#generating-a-key-pair).
20-
You'll also need to [publish your public
21-
key](http://central.sonatype.org/pages/working-with-pgp-signatures.html#distributing-your-public-key)
22-
to make it visible to the Sonatype servers. For gpg 2.1 or newer, you also
23-
need to [export the
24-
keys](https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials)
25-
with command `gpg --keyring secring.gpg --export-secret-keys >
26-
~/.gnupg/secring.gpg`.
27-
- Put your GnuPG key password and OSSRH account information in
28-
`<your-home-directory>/.gradle/gradle.properties`:
18+
page](https://central.sonatype.org/register/central-portal/) to set up an
19+
account with Central Portal.
20+
- You only need to create the account, not set up a new project.
21+
- Contact an OpenTelemetry Operations Java maintainer to add your account
22+
after you have created it.
23+
24+
### Setup artifact signing
25+
26+
The artifacts must be signed before being published for consumption. Follow
27+
these steps to set up artifact signing:
28+
- [Install
29+
GnuPG](http://central.sonatype.org/pages/working-with-pgp-signatures.html#installing-gnupg)
30+
and [generate your key
31+
pair](http://central.sonatype.org/pages/working-with-pgp-signatures.html#generating-a-key-pair).
32+
- You'll also need to [publish your public
33+
key](http://central.sonatype.org/pages/working-with-pgp-signatures.html#distributing-your-public-key)
34+
to make it visible to the Sonatype servers. For gpg 2.1 or newer, you also
35+
need to [export the
36+
keys](https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials)
37+
with command
38+
`gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg`.
39+
- Put your GnuPG key password and Central Portal account information in
40+
`<your-home-directory>/.gradle/gradle.properties`:
2941

3042
```text
3143
# You need the signing properties only if you are making release deployment
3244
signing.keyId=<8-character-public-key-id>
3345
signing.password=<key-password>
3446
signing.secretKeyRingFile=<your-home-directory>/.gnupg/secring.gpg
3547
36-
ossrhUsername=<ossrh-username>
37-
ossrhPassword=<ossrh-password>
48+
centralPortalUsername=<ossrh-username>
49+
centralPortalPassword=<ossrh-password>
3850
checkstyle.ignoreFailures=false
3951
```
4052
4153
> [!TIP]
42-
> If your key-generation is failing, checkout the [help section](#help-timeout-during-key-generation-process) at the bottom of this document.
54+
> If your key-generation is failing, checkout the
55+
> [help section](#help-timeout-during-key-generation-process) at the bottom of
56+
> this document.
4357
4458
### Using GPG-Agent for artifact signing
4559
4660
> [!NOTE]
4761
> These instructions are for modern linux where `gpg` refers to the 2.0 version.
4862
49-
If you're running in linux and would like to use the GPG agent to remember your PGP key passwords instead of keeping them in a plain-text file on your home directory,
50-
you can configure the following in `<your-home-directory>/.gradle/gradle.properties`:
63+
If you're running in linux and would like to use the GPG agent to remember your
64+
PGP key passwords instead of keeping them in a plain-text file on your home
65+
directory, you can configure the following in
66+
`<your-home-directory>/.gradle/gradle.properties`:
5167
5268
```text
53-
ossrhUsername=<generated-token-user>
54-
ossrhPassword=<generated-token-key>
69+
centralPortalUsername=<generated-token-user>
70+
centralPortalPassword=<generated-token-key>
5571
5672
signingUseGpgCmd=true
5773
signing.gnupg.executable=gpg
5874
signing.gnupg.keyName=<secret key id (large hash)>
5975
```
60-
Note: You can retrieve the list of previously created GPG keys on your machine by using `gpg --list-secret-keys`.
76+
77+
Note: You can retrieve the list of previously created GPG keys on your machine
78+
by using `gpg --list-secret-keys`. Additionally, you might still be asked for
79+
the GPG key's passphrase while signing the artifact, you can store the key in a
80+
password manager (or in the built-in Keyring) to avoid entering the password
81+
manually.\
82+
For more details, checkout the
83+
[help section](#help-timeout-while-singing-during-release-process) on the bottom
84+
of this guide.
6185
6286
> [!IMPORTANT]
63-
> Starting June 2024, due to a change to the OSSRH authentication backend, the maven publish plugin now requires [a user token](https://central.sonatype.org/publish/generate-token/) instead of a typical username and password used in the Nexus UI.
64-
> Follow the steps in the [link](https://central.sonatype.org/publish/generate-token/) to generate a user token, if not done already - this will provide you with a `tokenuser` and `tokenkey`. Replace `<generated-token-user>` and `<generated-token-key>` with the generated `tokenuser` and `tokenkey` in your `gradle.properties` file to successfully publish artifacts.
87+
> The user tokens for publishing to the Central Portal are different from those
88+
> used for OSSRH. If you haven't already, you must generate a new Portal Token
89+
> to publish to the Central Portal.
90+
> Follow the steps in this
91+
> [link](https://central.sonatype.org/publish/generate-portal-token/) to
92+
> generate a user token - this will provide you with a Portal token containing a
93+
> `username` and `password`. Replace `<generated-token-user>` and
94+
> `<generated-token-key>` with the generated `username` and `password` in your
95+
> `gradle.properties` file to successfully publish artifacts.
6596
6697
### Ensuring you can push tags to GitHub upstream
6798
@@ -71,12 +102,23 @@ token](https://help.github.com/articles/creating-a-personal-access-token-for-the
71102
72103
## Release a Snapshot
73104
74-
If you've followed the above steps, you can release snapshots for consumption using the following:
105+
If you've followed the above steps, you can release snapshots for consumption
106+
using the following:
75107
76108
```bash
77109
$ ./gradlew snapshot
78110
```
79111

112+
SNAPSHOT releases are intended for developers to make pre-release versions of
113+
their projects available for testing. Published snapshots should be visible
114+
using the
115+
[directory listing for com.google.cloud.opentelemetry](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/com/google/cloud/opentelemetry/)
116+
namespace.
117+
118+
See
119+
[Publishing Snapshot Releases](https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-snapshot-releases)
120+
for more details.
121+
80122
## Releasing a Candidate (Optional)
81123

82124
After following the above steps, you can release candidates from `main` or `v<major>.<minor>.x` branches.
@@ -93,7 +135,6 @@ $ git push origin v0.14.0-RC1
93135
Next follow [Releasing on Maven Central](#releasing-on-maven-central) to close + publish the
94136
[repository on OSSRH](https://oss.sonatype.org/#stagingRepositories).
95137

96-
97138
Note: In the future, the `-Prelease.version` flag should not be required.
98139

99140
## Release a final verison
@@ -183,3 +224,6 @@ A common example is - running this command on a remote machine over ssh.
183224
The issue here is that this command opens up a UI dialog asking for you to set a passphrase, waiting for input for a fixed time.
184225

185226
The easiest way to fix this is to run it on a machine for which you have UI access.
227+
228+
### Help: Timeout while singing during release process
229+
TODO: Add details

0 commit comments

Comments
 (0)