| 1 | # Publishing to the VS Code Marketplace and Open VSX |
| 2 | |
| 3 | Not done yet: for now the extension is served only from diffinery.com (`/-/vscode/diffinery.vsix`, built by |
| 4 | `apps/diffinery/scripts/build-docs.mjs`). These are the steps for when Diffinery goes public. Cursor, Windsurf and |
| 5 | VSCodium install from Open VSX; VS Code installs from the Visual Studio Marketplace, so both are needed. |
| 6 | |
| 7 | ## Before the first upload |
| 8 | |
| 9 | 1. Add a `LICENSE` file and a `license` field in `package.json` (both registries show it; `vsce` warns without it). |
| 10 | 2. Create the `codician` publisher on the Marketplace (https://marketplace.visualstudio.com/manage, needs an Azure |
| 11 | DevOps organization for the personal access token) and the `codician` namespace on Open VSX |
| 12 | (`npx ovsx create-namespace codician`, after signing the Eclipse publisher agreement). The extension id |
| 13 | `codician.diffinery` is what the server's OAuth client (`EDITOR_EXTENSION_ID` in `apps/diffinery/src/auth/oauth.ts`) |
| 14 | and the docs use, so keep it. |
| 15 | 3. Marketplace builds update through the marketplace: ship them with `diffinery.checkForUpdates` defaulting to |
| 16 | `false`, or have `src/updates.ts` skip the check when the extension was installed from a gallery, so the two |
| 17 | update paths don't fight. |
| 18 | |
| 19 | ## Listing |
| 20 | |
| 21 | | Field | Value | |
| 22 | | --- | --- | |
| 23 | | Name | Diffinery | |
| 24 | | Short description | `description` in `package.json` | |
| 25 | | Categories | SCM Providers, Other | |
| 26 | | Icon | `media/icon.png` (128×128) | |
| 27 | | Banner | `galleryBanner` in `package.json` | |
| 28 | | Details page | `README.md` (relative image links are rewritten to the repository) | |
| 29 | | Changelog | `CHANGELOG.md` | |
| 30 | | Q&A / issues | `bugs.url` in `package.json` | |
| 31 | |
| 32 | ## Each release |
| 33 | |
| 34 | 1. Bump `version` in `package.json` and add a `CHANGELOG.md` entry. |
| 35 | 2. `node scripts/package.mjs --out dist` builds `dist/diffinery-<version>.vsix`, the same file diffinery.com serves. |
| 36 | 3. `npx @vscode/vsce publish --packagePath dist/diffinery-<version>.vsix` and |
| 37 | `npx ovsx publish dist/diffinery-<version>.vsix`, with the tokens from steps 2 above in `VSCE_PAT` and `OVSX_PAT`. |
| 38 | 4. Deploying Diffinery keeps diffinery.com serving the same version for people who installed from there. |