Skip to content

ci: ship a verifiable VSIX to releases and add gated Marketplace/Open VSX publish - #240

Open
Muhammad Ahmad Ali (MhAhmadAli) wants to merge 2 commits into
microsoft:mainfrom
MhAhmadAli:ci/release-vsix-distribution
Open

ci: ship a verifiable VSIX to releases and add gated Marketplace/Open VSX publish#240
Muhammad Ahmad Ali (MhAhmadAli) wants to merge 2 commits into
microsoft:mainfrom
MhAhmadAli:ci/release-vsix-distribution

Conversation

@MhAhmadAli

Copy link
Copy Markdown

Towards #92. Also unblocks the duplicate cluster #123, #130 and #140 once a tag is pushed.

Re-opening of #225, which was closed on a blocked CLA before it could be reviewed. The CLA is being agreed on this PR; the content is unchanged apart from a rebase onto current main.

What I found

The automation for "Option 1 — prebuilt VSIX via GH releases" already exists. release.yml builds, tests, packages and attaches the .vsix on any v*.*.* tag. It has simply never run: the repo has zero tags, and the file has only ever been touched by Dependabot and by the SHA-pinning pass in #223. So the gap is not a missing pipeline — it is (a) no tag has been cut, (b) nothing publishes to a marketplace, and (c) nothing about the artifact is verifiable, which is what the issue's enterprise angle actually asks for.

This PR closes (b) and (c), and tightens the artifact before the first publish makes it permanent. It deliberately does not touch the README — advertising a release that does not exist yet is exactly the bug reported in #123. That doc flip belongs in the PR that lands alongside the first tag.

Changes

.github/workflows/release.yml

  • Emit a .sha256 beside the VSIX and attach both to the release.
  • Attest build provenance (actions/attest-build-provenance, SHA-pinned per Pin GitHub Actions to full-length commit SHAs #223), so anyone can run gh attestation verify ai-engineer-coach-<version>.vsix --repo microsoft/AI-Engineering-Coach on the download.
  • Run check-size in the release job, not only in CI, so an oversized VSIX cannot reach a release.
  • Publish to the VS Code Marketplace and to Open VSX with --packagePath, so the bytes on the release, on the Marketplace and on Open VSX are byte-identical and the checksum/attestation cover all three. Open VSX matters for VS Code OSS builds (VSCodium, Antigravity), which cannot reach the Microsoft Marketplace — see bug: Unable to install extension for VSCode OSS Version: 1.107.0 #41.
  • Both publish steps are gated on vars.PUBLISH_MARKETPLACE / vars.PUBLISH_OPENVSX, so this merges inert and stays a no-op until maintainers opt in. Secrets are passed through env: rather than interpolated into run:.
  • Workflow-level permissions narrowed to contents: read, elevated only on the release job.

.vscodeignore

The package was carrying 2.5 MB of README screenshots plus AGENTS.md, skills/ and .claude/, none of which are read at runtime. assets/icon.png stays — it is both the extension icon and the chat participant icon (src/chat/participant.ts).

Verification

npm ci && npm run package && npm run check-size, measured on this branch and on current main for the baseline:

main this branch
VSIX size 3.35 MB 1.04 MB
files 94 73

dist/ and assets/icon.png are intact; check-size passes both budgets. The workflow YAML parses clean.

What still needs a maintainer

  1. Push a tag. git tag v0.1.0 && git push origin v0.1.0 produces the first release on its own, even with zero further changes. That alone resolves Documentation: Download from releases as the preferred option? #123/Cut first release so README .vsix install path works #130/There is no release page that the instructions talk about in the github? #140.
  2. Register the publisher. package.json claims publisher: "ai-engineer-coach", which has to exist on the Marketplace and be owned by the org. This sets the permanent extension ID, so it is worth deciding before the first publish.
  3. Pick an auth method. The pinned @vscode/vsce (3.9.2) supports VSCE_PAT and --azure-credential (Entra ID), but not --oidc — trusted publishing only exists on vsce main / the 3.9.3 prereleases. Note Azure DevOps retires global PATs on 2026-12-01, so VSCE_PAT is a stopgap and --azure-credential is the durable path. Happy to switch the step over if that is the preference.

One thing worth flagging separately

engines.vscode is ^1.125.0, while the README badge says 1.115+, README.extension.md says 1.85+ and skills/package-extension.md says ^1.120.0. Once this is on the Marketplace, engines becomes load-bearing: everyone below 1.125 gets "not compatible", which reproduces #41 for the published artifact. Settling on a real minimum needs an API-usage audit, so I left it alone rather than guessing.

The release workflow already attached a VSIX to a tagged release, but stopped
there: no checksum, no provenance, no size gate, and no path to either
marketplace. Enterprises that cannot build locally still had nothing to verify.

- attach a .sha256 next to the VSIX and attest its build provenance, so
  consumers can run gh attestation verify against the downloaded file
- run check-size in the release job, not just CI, so an oversized VSIX
  cannot reach a release
- publish the exact release bytes via --packagePath to the VS Code
  Marketplace and to Open VSX, which serves VS Code OSS builds
- keep both publish steps inert until a maintainer opts in with the
  PUBLISH_MARKETPLACE / PUBLISH_OPENVSX repository variables
- narrow workflow permissions to read and elevate only the release job
The package carried 2.5 MB of README screenshots plus AGENTS.md, skills/ and
.claude/, none of which are read at runtime. assets/icon.png stays, since it is
both the extension icon and the chat participant icon.

Packaged output drops from 3.35 MB to 1.04 MB across 94 to 73 files.
@MhAhmadAli

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Download from releases as the preferred option?

1 participant