Skip to content

Commit d21a4be

Browse files
committed
Attempt at central publishing 2
1 parent e85017f commit d21a4be

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,23 @@ class Example {
130130

131131
```
132132

133+
## Publishing to Maven Central
134+
135+
EntityLib uses the new Maven Central publishing system via the Central Portal (replacing the deprecated OSSRH). To publish, set up the following GitHub secrets:
136+
137+
- `OSSRH_USERNAME`: Your Central Portal username (usually your email).
138+
- `OSSRH_PASSWORD`: Your publishing token from the Central Portal.
139+
- `GPG_PRIVATE_KEY`: Your GPG private key (for signing artifacts).
140+
- `GPG_PASSPHRASE`: The passphrase for your GPG key.
141+
142+
### Setting Up Central Portal Credentials
143+
1. Go to [Central Portal](https://central.sonatype.com/) and log in with your GitHub account.
144+
2. Create a namespace for your group ID (`io.github.tofaa2`).
145+
3. Generate a publishing token from the "Account Settings" > "Publishing Tokens".
146+
4. Use your email as the username and the token as the password.
147+
148+
Snapshots are automatically published on pushes to the `master` branch. Stable releases are published when a GitHub release is created.
149+
133150
### TODO:
134151
Once this list is complete, i will release a stable version of the library.
135152
- [ ] Implement checks for each EntityMeta to make sure the version specific data is correct.

buildSrc/src/main/kotlin/entitylib.library-conventions.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ publishing {
8686
maven {
8787
url = uri("https://central.sonatype.com/api/v1/publisher/upload")
8888
credentials {
89-
username = System.getenv("CENTRAL_PORTAL_USERNAME")
90-
password = System.getenv("CENTRAL_PORTAL_TOKEN")
89+
username = System.getenv("OSSRH_USERNAME")
90+
password = System.getenv("OSSRH_PASSWORD")
9191
}
9292
}
9393
}

0 commit comments

Comments
 (0)