diff --git a/.github/workflows/publish-jetbrains.yml b/.github/workflows/publish-jetbrains.yml index 3465c4f78f1..4db34d33be8 100644 --- a/.github/workflows/publish-jetbrains.yml +++ b/.github/workflows/publish-jetbrains.yml @@ -50,12 +50,12 @@ jobs: id: version run: | tag="$GITHUB_REF_NAME" - if [[ "$tag" != jetbrains/* ]]; then - echo "Unsupported tag '$tag'. Expected jetbrains/." >&2 + if [[ "$tag" != jetbrains/v* ]]; then + echo "Unsupported tag '$tag'. Expected jetbrains/v." >&2 exit 1 fi - version="${tag#jetbrains/}" + version="${tag#jetbrains/v}" if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ ]]; then { echo "version=$version" @@ -73,11 +73,11 @@ jobs: echo "marketplace_channel=default" echo "cli_channel=latest" } >> "$GITHUB_OUTPUT" - echo "Stable JetBrains Marketplace publishing is implemented but intentionally disabled; use an rc tag such as jetbrains/7.0.1-rc.1." >&2 + echo "Stable JetBrains Marketplace publishing is implemented but intentionally disabled; use an rc tag such as jetbrains/v7.0.1-rc.1." >&2 exit 1 fi - echo "Unsupported JetBrains plugin version '$version'. Expected x.y.z-rc.n or x.y.z." >&2 + echo "Unsupported JetBrains plugin version '$version'. Expected jetbrains/vx.y.z-rc.n or jetbrains/vx.y.z." >&2 exit 1 - name: Validate publishing secrets diff --git a/packages/kilo-jetbrains/README.md b/packages/kilo-jetbrains/README.md index 8cd2eed1cc5..4cfb14ddd24 100644 --- a/packages/kilo-jetbrains/README.md +++ b/packages/kilo-jetbrains/README.md @@ -54,9 +54,9 @@ The built plugin archive is at `build/distributions/kilo.jetbrains-.zip ## Publish release candidates -JetBrains release-candidate builds publish from tags matching `jetbrains/x.y.z-rc.n`, for example `jetbrains/7.0.1-rc.1`. The git tag is the source of truth for the Marketplace plugin version; production Gradle builds ignore manually supplied version properties and fail if `HEAD` is not tagged with `jetbrains/`. Local dev builds can use the placeholder `0.0.0-dev` version. +JetBrains release-candidate builds publish from tags matching `jetbrains/vx.y.z-rc.n`, for example `jetbrains/v7.0.1-rc.1`. The git tag is the source of truth for the Marketplace plugin version; the `v` prefix is stripped before the version is set in the plugin metadata so the Marketplace version remains a plain semver (`x.y.z-rc.n`). Production Gradle builds fail if `HEAD` is not tagged with `jetbrains/v`. Local dev builds use the placeholder `0.0.0-dev` version. -The `publish-jetbrains` workflow publishes RC builds to the JetBrains Marketplace `eap` channel and uploads the same plugin ZIP to a GitHub prerelease for the tag. Stable tags like `jetbrains/x.y.z` are recognized by the workflow but intentionally rejected until default-channel publishing is enabled. +The `publish-jetbrains` workflow publishes RC builds to the JetBrains Marketplace `eap` channel and uploads the same plugin ZIP to a GitHub prerelease for the tag. Stable tags like `jetbrains/vx.y.z` are recognized by the workflow but intentionally rejected until default-channel publishing is enabled. Testers can install or update EAP builds from this custom plugin repository: diff --git a/packages/kilo-jetbrains/RELEASE_TODO.md b/packages/kilo-jetbrains/RELEASE_TODO.md index d3b8430da4d..1f8efae536f 100644 --- a/packages/kilo-jetbrains/RELEASE_TODO.md +++ b/packages/kilo-jetbrains/RELEASE_TODO.md @@ -13,7 +13,7 @@ - Create a JetBrains Marketplace permanent token from Marketplace `My Tokens`. - Add `JETBRAINS_MARKETPLACE_TOKEN` to GitHub Actions secrets or the protected environment. -- Confirm `GITHUB_TOKEN` has `contents: write` permission for creating and updating GitHub Releases from `jetbrains/*` tags. +- Confirm `GITHUB_TOKEN` has `contents: write` permission for creating and updating GitHub Releases from `jetbrains/v*` tags. - Optionally create a protected `jetbrains-marketplace` GitHub Environment with required reviewers. - If using an environment, move the Marketplace and signing secrets there and set the workflow job environment. @@ -29,16 +29,16 @@ ## Per-RC Release - Choose an RC version in the form `x.y.z-rc.n`. -- Push tag `jetbrains/x.y.z-rc.n`. +- Push tag `jetbrains/vx.y.z-rc.n`, for example `jetbrains/v7.0.1-rc.1`. - Watch the `publish-jetbrains` workflow. - Download and retain the workflow artifact if needed. - Confirm the update appears on the JetBrains Marketplace `eap` channel. -- Confirm the GitHub Release for the `jetbrains/x.y.z-rc.n` tag exists and contains the JetBrains plugin ZIP asset. +- Confirm the GitHub Release for the `jetbrains/vx.y.z-rc.n` tag exists and contains the JetBrains plugin ZIP asset. - Share `https://plugins.jetbrains.com/plugins/eap/list` with testers. ## Stable Release Guard -- Stable tags like `jetbrains/x.y.z` are intentionally rejected for now. +- Stable tags like `jetbrains/vx.y.z` are intentionally rejected for now. - Before enabling stable releases, remove the workflow stable guard. - Verify `kilo.channel=default` publishes to the default Marketplace channel. - Update this checklist before stable releases are enabled. diff --git a/packages/kilo-jetbrains/build.gradle.kts b/packages/kilo-jetbrains/build.gradle.kts index 3ce7ec96cd4..975f360bae2 100644 --- a/packages/kilo-jetbrains/build.gradle.kts +++ b/packages/kilo-jetbrains/build.gradle.kts @@ -17,14 +17,14 @@ fun gitTag(): String? { val text = providers.exec { commandLine("git", "tag", "--points-at", "HEAD") }.standardOutput.asText.get() - return text.lineSequence().map { it.trim() }.firstOrNull { it.startsWith("jetbrains/") } + return text.lineSequence().map { it.trim() }.firstOrNull { it.startsWith("jetbrains/v") } } val release = providers.gradleProperty("production").map { it.toBoolean() }.orElse(false).get() val ver = if (release) checked( - gitTag()?.removePrefix("jetbrains/") - ?: error("Missing JetBrains plugin version. Publish builds must run from a jetbrains/ tag."), -) else checked(gitTag()?.removePrefix("jetbrains/") ?: "0.0.0-dev") + gitTag()?.removePrefix("jetbrains/v") + ?: error("Missing JetBrains plugin version. Publish builds must run from a jetbrains/v tag."), +) else checked(gitTag()?.removePrefix("jetbrains/v") ?: "0.0.0-dev") val notes = providers.gradleProperty("kilo.changeNotes").orElse("Release candidate build.") val channel = providers.gradleProperty("kilo.channel").map { it.trim() }.orElse("default")