From f8b6d14510b0392f81ae7cf213ac744e8f1e0e56 Mon Sep 17 00:00:00 2001 From: samiamorwas Date: Sat, 15 Aug 2026 23:36:55 -0400 Subject: [PATCH] fix(zed): cleanup docs, prepare for publish. --- .github/workflows/release.yml | 17 ---------- RELEASE.md | 64 ++++++++++++++++++++++++++++++----- generator/index.ts | 10 +++++- themes/zed/LICENSE | 21 ++++++++++++ themes/zed/README.md | 4 +++ themes/zed/extension.toml | 6 ++-- 6 files changed, 93 insertions(+), 29 deletions(-) create mode 100644 themes/zed/LICENSE diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82dcd59..a978da0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -154,23 +154,6 @@ jobs: - name: Publish to OpenVSX run: npx --yes ovsx publish synthpunk-*.vsix -p ${{ secrets.OVSX_TOKEN }} - publish-zed: - name: Publish Zed extension - needs: [build-artifacts, tag-and-release] - if: vars.PUBLISH_ZED == 'true' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ needs.tag-and-release.outputs.tag }} - - - name: Publish Zed extension - working-directory: themes/zed - run: | - # The zed CLI may not be available on CI runners. If this fails, - # see RELEASE.md for manual publishing instructions. - zed extension publish - publish-neovim: name: Publish to synthpunk.nvim repo needs: [build-artifacts, tag-and-release] diff --git a/RELEASE.md b/RELEASE.md index 01b8356..6ca8399 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,6 @@ # Release Operations -This document catalogues the manual steps and prerequisites for the release workflow. The automated flow lives in `.github/workflows/`. Each publish channel is gated on a repository variable — when the variable is `true` and the corresponding secret is configured, publishing is automatic. Otherwise the channel is skipped and the steps below serve as the manual fallback. +This document catalogues the manual steps and prerequisites for the release workflow. The automated flow lives in `.github/workflows/`. Each automatable publish channel is gated on a repository variable — when the variable is `true` and the corresponding secret is configured, publishing is automatic. Otherwise the channel is skipped and the steps below serve as the manual fallback. Zed is the exception: it has no automated path at all and always requires a pull request against the registry. ## Prerequisites (one-time setup) @@ -24,9 +24,26 @@ This document catalogues the manual steps and prerequisites for the release work ### Zed -- A Zed account with extension publishing access. -- **`ZED_PUBLISH_TOKEN`** secret: the publish token (if the `zed extension publish` CLI supports it — confirm the exact mechanism). -- **`PUBLISH_ZED`** variable set to `true` to enable auto-publishing. +Zed has no publish CLI and no token-based channel — the registry is a git repository, and every version ships as a pull request against it. **Zed is never automated by `release.yml`; it is always a manual follow-up.** + +- A fork of [`zed-industries/extensions`](https://github.com/zed-industries/extensions), cloned locally (assumed at `../extensions` below) with an `upstream` remote pointing at the canonical repo. +- Nothing else — no account, secret, or repository variable is involved. + +The registry registers the extension as a git submodule of this repository plus an entry in its `extensions.toml`. Because our manifest lives at `themes/zed/` rather than the repository root, that entry carries a `path` field: + +```toml +[synthpunk-theme] +submodule = "extensions/synthpunk-theme" +path = "themes/zed" +version = "X.Y.Z" +``` + +Two constraints are enforced by the registry's CI and are easy to trip over: + +- The submodule must be named and located at `extensions/synthpunk-theme` — matching the `id` in `themes/zed/extension.toml`, not the name of this repository — and must use an `https://` URL. +- The license is read from the extension directory only, never the repository root. `themes/zed/LICENSE` is generated by `bun run build` for exactly this reason; do not delete it. + +The extension ID is permanent. The registry rejects any PR that both adds and removes an ID, so `synthpunk-theme` cannot be renamed after the first submission — only the display name in `extension.toml` can change. ### Neovim (synthpunk.nvim) @@ -57,12 +74,43 @@ npx ovsx publish synthpunk-vX.Y.Z.vsix -p ### Zed +Always manual. Both recipes assume the fork is at `../extensions` with an `upstream` remote, and that `vX.Y.Z` has already been tagged here. + +**First submission (one time only):** + ```sh -git checkout vX.Y.Z -cd themes/zed -zed extension publish +cd ../extensions +git fetch upstream +git checkout -b add-synthpunk-theme upstream/main +git submodule add https://github.com/slowdini/synthpunk.git extensions/synthpunk-theme +git -C extensions/synthpunk-theme checkout vX.Y.Z +# add the [synthpunk-theme] entry shown above to extensions.toml +pnpm install && pnpm sort-extensions +git add extensions.toml .gitmodules extensions/synthpunk-theme +git commit -m "Add synthpunk theme" +git push -u origin add-synthpunk-theme +``` + +Then open a PR against `zed-industries/extensions` titled `Add synthpunk theme`. Test the extension locally first (Zed → Extensions → Install Dev Extension → select `themes/zed/`); their CONTRIBUTING.md states that untested submissions are closed. + +**Subsequent versions:** + +```sh +cd ../extensions +git fetch upstream +git checkout -b update-synthpunk-vX.Y.Z upstream/main +git submodule update --init --recursive extensions/synthpunk-theme +git -C extensions/synthpunk-theme fetch --tags +git -C extensions/synthpunk-theme checkout vX.Y.Z +# bump `version` under [synthpunk-theme] in extensions.toml to X.Y.Z +pnpm install && pnpm sort-extensions +git add extensions.toml .gitmodules extensions/synthpunk-theme +git commit -m "Update synthpunk-theme to vX.Y.Z" +git push -u origin update-synthpunk-vX.Y.Z ``` +The `version` in `extensions.toml` must exactly match the `version` in `themes/zed/extension.toml` at the pinned commit, and must not decrease. + ### Neovim (synthpunk.nvim) ```sh @@ -87,6 +135,6 @@ git push origin vX.Y.Z - Tags `vX.Y.Z`, creates GitHub Release (notes from PR body or auto-generated). - Builds all themes, uploads Starship + WezTerm files to the release. - Builds VS Code VSIX, publishes to Marketplace/OpenVSX if configured. - - Publishes Zed extension if configured. - Splits `themes/neovim/` to `slowdini/synthpunk.nvim` if configured. 5. **Back-sync**: Merge `main` back into `dev`. +6. **Zed**: Open the PR against `zed-industries/extensions` by hand — see the Zed section above. This channel is never automated. diff --git a/generator/index.ts b/generator/index.ts index 35a58b9..ca87830 100644 --- a/generator/index.ts +++ b/generator/index.ts @@ -17,7 +17,8 @@ import { loadUIMapping } from "./uiMapping"; const PROJECT_DIR = path.resolve(import.meta.dir, "../"); const PALETTE_DIR = path.join(PROJECT_DIR, "palette"); -const ZED_DIR = path.join(PROJECT_DIR, "themes", "zed", "themes"); +const ZED_EXTENSION_DIR = path.join(PROJECT_DIR, "themes", "zed"); +const ZED_DIR = path.join(ZED_EXTENSION_DIR, "themes"); const VSCODE_DIR = path.join(PROJECT_DIR, "themes", "vscode", "themes"); const WEZTERM_DIR = path.join(PROJECT_DIR, "themes", "wezterm"); const STARSHIP_DIR = path.join(PROJECT_DIR, "themes", "starship"); @@ -113,6 +114,13 @@ function generateAll() { ); console.log(`Generated ${neonZedPath}`); + // The Zed extension registry reads the license from the extension directory + // only (it never walks up to the repository root), so the root LICENSE has to + // be mirrored here or submission fails with "No license was found." + const zedLicensePath = path.join(ZED_EXTENSION_DIR, "LICENSE"); + fs.copyFileSync(path.join(PROJECT_DIR, "LICENSE"), zedLicensePath); + console.log(`Generated ${zedLicensePath}`); + // Generate WezTerm themes ensureDir(WEZTERM_DIR); for (const variant of VARIANTS) { diff --git a/themes/zed/LICENSE b/themes/zed/LICENSE new file mode 100644 index 0000000..c48dcb6 --- /dev/null +++ b/themes/zed/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Synthpunk contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/themes/zed/README.md b/themes/zed/README.md index b2e8021..ffa0f68 100644 --- a/themes/zed/README.md +++ b/themes/zed/README.md @@ -14,6 +14,10 @@ High-energy synthwave-inspired color themes for Zed. - **Synthpunk Neon Dark** — Electric vaporwave neon on deep purple-black - **Synthpunk Neon Light** — Experimental holographic iridescence +## Install + +Open **Extensions** in Zed (or run `zed: extensions`), search for **Synthpunk**, and install it. Then pick a variant from the theme picker (`theme selector: toggle`). + ## Local Development To test this extension locally in Zed: diff --git a/themes/zed/extension.toml b/themes/zed/extension.toml index 7088a6f..1fa0dc2 100644 --- a/themes/zed/extension.toml +++ b/themes/zed/extension.toml @@ -1,7 +1,7 @@ -id = "synthpunk" +id = "synthpunk-theme" name = "Synthpunk" version = "0.1.3" schema_version = 1 -authors = ["Synthpunk"] -description = "Synthwave-inspired color themes (pastel + neon, dark + light) for Zed" +authors = ["Synthpunk "] +description = "Synthwave-inspired color themes in two families — Pastel and Neon — each with a dark and a light variant." repository = "https://github.com/slowdini/synthpunk"