Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kord

[![Discord](https://img.shields.io/discord/556525343595298817.svg?color=&label=Kord&logo=discord&style=for-the-badge)](https://discord.gg/6jcx5ev)
[![Download](https://img.shields.io/maven-central/v/dev.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://central.sonatype.com/artifact/dev.kord/kord-core)
[![Download](https://img.shields.io/maven-central/v/computer.kolektiv.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://central.sonatype.com/artifact/computer.kolektiv.kord/kord-core)
[![Github CI status (branch)](https://img.shields.io/github/actions/workflow/status/kordlib/kord/deployment-ci.yml?branch=main&label=CI&style=for-the-badge)]()

Kord is a [coroutine-based](https://kotlinlang.org/docs/reference/coroutines-overview.html), modularized implementation
Expand Down Expand Up @@ -61,7 +61,7 @@ e.g: `feature-amazing-thing-SNAPSHOT` for the branch `feature/amazing-thing`
For Snapshots for the branch `main` replace `{version}` with `{nextPlannedVersion}-SNAPSHOT` (see `nextPlannedVersion`
in [`gradle.properties`](gradle.properties))

[![Download](https://img.shields.io/maven-central/v/dev.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://central.sonatype.com/artifact/dev.kord/kord-core)
[![Download](https://img.shields.io/maven-central/v/computer.kolektiv.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://central.sonatype.com/artifact/computer.kolektiv.kord/kord-core)

### Gradle (Kotlin)

Expand All @@ -72,7 +72,7 @@ repositories {
}

dependencies {
implementation("dev.kord:kord-core:{version}")
implementation("computer.kolektiv.kord:kord-core:{version}")
}
```

Expand All @@ -87,7 +87,7 @@ repositories {
}

dependencies {
implementation("dev.kord:kord-core:{version}")
implementation("computer.kolektiv.kord:kord-core:{version}")
}
```

Expand All @@ -112,7 +112,7 @@ dependencies {

```xml
<dependency>
<groupId>dev.kord</groupId>
<groupId>computer.kolektiv.kord</groupId>
<artifactId>kord-core-jvm</artifactId>
<version>{version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Projects.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.gradle.api.provider.Provider

object Library {
const val name = "kord"
const val group = "dev.kord"
const val group = "computer.kolektiv.kord"
const val description = "Idiomatic Kotlin Wrapper for The Discord API"
const val projectUrl = "https://github.com/kordlib/kord"
}
Expand Down
32 changes: 32 additions & 0 deletions buildSrc/src/main/kotlin/kord-publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ mavenPublishing {

publishing {
repositories {

val ghActor = providers.environmentVariable("GITHUB_ACTOR")
val ghToken = providers.environmentVariable("GITHUB_TOKEN")
if (ghActor.isPresent && ghToken.isPresent) {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/KolektivComputer/kord")
credentials {
username = ghActor.get()
password = ghToken.get()
}
}
}

// Legacy upstream GH Packages (optional; prefer KolektivComputer above)
maven {
url = uri("https://maven.pkg.github.com/kordlib/kord")

Expand All @@ -70,5 +85,22 @@ publishing {
password = System.getenv("GITHUB_TOKEN")
}
}

val yuriUser = providers.environmentVariable("YURI_CAPITAL_REPO_USERNAME")
val yuriPass = providers.environmentVariable("YURI_CAPITAL_REPO_PASSWORD")
if (yuriUser.isPresent && yuriPass.isPresent) {
val snapshot = libraryVersion.get().endsWith("-SNAPSHOT", ignoreCase = true)
maven {
name = if (snapshot) "yuriSnapshots" else "yuriReleases"
url = uri(
if (snapshot) "https://repo.yuri.capital/repository/maven-snapshots/"
else "https://repo.yuri.capital/repository/maven-releases/"
)
credentials {
username = yuriUser.get()
password = yuriPass.get()
}
}
}
}
}
54 changes: 54 additions & 0 deletions docs/CI_DUAL_PUBLISH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Dual-publish (GH Packages + Yuri + JSR)

Org epic: [KolektivComputer/.github#2](https://github.com/KolektivComputer/.github/issues/2)
Spine: [gradle-conventions#1](https://github.com/KolektivComputer/gradle-conventions/pull/1) → plugin `computer.kolektiv.publishing`

## Maven
- GroupId: `computer.kolektiv.kord` (org family `computer.kolektiv.*`)
- Dual repositories: GitHub Packages `https://maven.pkg.github.com/KolektivComputer/kord` **and** Yuri Capital (`maven-releases` / `maven-snapshots`) when credentials are present
- Prefer `id("computer.kolektiv.publishing")` once the conventions plugin is published; until then repos are inlined to match that plugin

## npm
- Scope **`@kolektiv/...` only** — do not invent a second JS scope
- Dual: existing Yuri Capital npm (where used) + `https://npm.pkg.github.com` with `@kolektiv:registry=…`
- Auth: `NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}` with `permissions.packages: write`

## JSR
- Scope `@kolektiv` (owned)
- Actions: OIDC only — `permissions.id-token: write` — **no org `JSR_TOKEN`**
- Mey: link each package on jsr.io for GitHub Actions trusted publishing
- Not a substitute for npm publish

## Workflow paste (token may lack `workflows` scope)

```yaml
permissions:
contents: read
packages: write
id-token: write # JSR OIDC
```

Maven job env:
```yaml
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# optional Yuri dual:
# YURI_CAPITAL_REPO_USERNAME / YURI_CAPITAL_REPO_PASSWORD (org secrets)
```

npm → GitHub Packages:
```yaml
- uses: actions/setup-node@v4
with:
registry-url: https://npm.pkg.github.com
scope: "@kolektiv"
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

JSR:
```yaml
- run: npx jsr publish
```

Kotlin packages remain `dev.kord.*` until a follow-up; Maven group is `computer.kolektiv.kord`.
Loading