Skip to content

Commit dc875d1

Browse files
committed
readme update
1 parent 3188b16 commit dc875d1

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

readme.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ sbt ciReleaseSkipIfAlreadyReleased ciReleaseTagNextVersion ciRelease
5353
## Setup for Sonatype / Maven central
5454
Sonatype central (which syncs to maven central) imposes additional constraints on the published artifacts, so the setup becomes a little more involved. These steps assume you're using github actions, but it'd be similar on other build servers.
5555

56-
### Sonatype account
57-
If you don't have a Sonatype account yet, follow the instructions in https://central.sonatype.org/pages/ossrh-guide.html to create one.
56+
### Sonatype central account
57+
If you don't have a Sonatype account yet, follow the instructions in https://central.sonatype.org/register/central-portal/ to create one.
5858

5959
### build.sbt
6060
In your `build.sbt` do *not* define the `version` setting and ensure the following settings *are* configured:
@@ -125,17 +125,15 @@ gpg --keyserver keyserver.ubuntu.com --send-keys $LONG_ID
125125
```
126126

127127
### Secrets to share with Github actions
128-
So that Github Actions can release on your behalf, we need to share some secrets via environment variables with github actions. You can either do that for your project or an entire organization.
128+
So that Github Actions can release on your behalf, we need to share some secrets via environment variables with github actions. You can either do that for your project or an entire organization. Sonatype requires you to authorize your deployment artifacts with an access token, which you can get retrieve from sonatype and share with github actions as follows:
129129

130-
> [!NOTE]
131-
> As of June 2024, Sonatype requires you to log in with an access token, you can no longer use your regular username/password.
132-
133-
First you need to obtain a Sonatype username/password token:
134-
- log into https://oss.sonatype.org
135-
- select `Profile` from the dropdown at the top right
136-
- `User Token` -> `Access` -> `Access user token`
137-
138-
Now go to your github project or organization and navigate to `Settings` -> `Secrets and variables` -> `Actions` and add the following `Repository secrets`:
130+
- sign into https://central.sonatype.com
131+
- go to https://central.sonatype.com/account (or click on `Av` at the top right and navigate to `Account`)
132+
- Generate a user token and save it somewhere
133+
134+
Now you can share those for your entire github organization's github actions or only for a single project as follows:
135+
- navigate to your project or organization on github
136+
- `Settings` -> `Secrets and variables` -> `Actions` and add the following `Repository secrets`:
139137
- `SONATYPE_USERNAME`: the name part of the user token you generated in the previous step
140138
- `SONATYPE_PASSWORD`: the password part of the user token you generated in the previous step
141139
- `PGP_SECRET`: The base64 encoded secret of your private key that you can export from the command line like here below
@@ -233,7 +231,7 @@ git ls-remote --tags $REPO | awk -F"/" '{print $3}' | grep '^v[0-9]*\.[0-9]*\.[0
233231
```
234232
235233
### My Sonatype staging repos seems to be in a broken state
236-
When a build is e.g. interrupted, or didn't satisfy the Sonatype requirements for publishing, it is likely that these artifacts are still lying around in the Sonatype staging area. You can log into https://oss.sonatype.org/ and clean it up, or just do it from within sbt, locally on your machine:
234+
When a build is e.g. interrupted, or didn't satisfy the Sonatype requirements for publishing, it is likely that these artifacts are still lying around in the Sonatype staging area. You can log into https://central.sonatype.com/ and clean it up, or just do it from within sbt, locally on your machine:
237235
238236
* `sonatypeStagingRepositoryProfiles` // lists staging repo ids
239237
* `sonatypeDrop [id]`

0 commit comments

Comments
 (0)