Skip to content

Add Publishing VSCE to CI + Automated Versioning to VSCE#499

Merged
nmetulev merged 10 commits into
mainfrom
cm/add-vsc-publish
May 1, 2026
Merged

Add Publishing VSCE to CI + Automated Versioning to VSCE#499
nmetulev merged 10 commits into
mainfrom
cm/add-vsc-publish

Conversation

@chiaramooney

@chiaramooney chiaramooney commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Description

Adds end-to-end pipeline support for publishing the VS Code extension to the Marketplace, including npm
authentication via Azure Artifacts, automated post-publish version bumps, and release script support for extension
versioning.

Pipeline — release.yml

  • New SkipVscRelease parameter — defaults to true so VSC publish is disabled by default for now; will switch to false later when we are ready to publish
    to publish
  • New Release_VSC stage — publishes the pre-built VSIX to the VS Code Marketplace using vsce publish
    - Creates a temporary .npmrc pointing to the winapp-npm-feed Azure Artifacts feed
    - Uses npmAuthenticate@0 for secure authentication (required by Microsoft security policy — no direct npm
    installs)
    - Installs @vscode/vsce locally and invokes via npx to ensure .npmrc auth is respected
    - Uses VSCE_PAT from the vsceMarketplaceIdentity variable group
  • New Bump_VSC_Version stage — runs after successful publish, automatically creates a PR to bump the patch version
    in src/winapp-VSC/package.json on main
  • VSIX added to GitHub Release assets — the .vsix file is now included alongside MSIX, tgz, and nupkg artifacts

Build template — build.yaml

  • Added copy + publish steps for the VS Code extension VSIX artifact (mirrors the existing pattern for NuGet
    packages)

Versioning fix — package-vsc.ps1 + build-cli.ps1

  • Bug fix: package-vsc.ps1 now reads the base version from src/winapp-VSC/package.json instead of version.json —
    the extension has its own version, independent of the CLI
  • build-cli.ps1 no longer passes the CLI's version to package-vsc.ps1; the script determines its own version

Release script — start-release.ps1

  • New -VscVersion parameter — allows the release driver to optionally set the VS Code extension version on the
    release branch (e.g., -VscVersion
    0.2.0 for a minor bump)
  • Validates the format, displays it in the release plan, and commits the update to src/winapp-VSC/package.json on
    the release branch before push

Related Issue

Related to #447

Type of Change

  • 🔧 Config/build

AI Description

This pull request introduces a CI pipeline to automate the publishing of the VS Code extension to the Marketplace, featuring new stages for building and publishing, and the ability to bump version numbers post-release. It also adds npm authentication via Azure Artifacts and includes compiled VSIX files as part of GitHub release assets. Users can specify the VS Code extension version during releases using the new -VscVersion parameter in start-release.ps1.

Code usage examples:

# To initiate a release with a specific version
./scripts/start-release.ps1 -VscVersion 0.2.0

Breaking Change: None.

@github-actions github-actions Bot added the enhancement New feature or request label Apr 24, 2026
@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 30.84 MB 30.84 MB ✅ 0.0 KB (0.00%)
CLI (x64) 31.20 MB 31.20 MB ✅ 0.0 KB (0.00%)
MSIX (ARM64) 13.00 MB 13.00 MB 📉 -0.3 KB (-0.00%)
MSIX (x64) 13.81 MB 13.81 MB 📉 -0.0 KB (-0.00%)
NPM Package 27.06 MB 27.06 MB 📈 +0.1 KB (+0.00%)
NuGet Package 27.14 MB 27.14 MB 📉 -0.4 KB (-0.00%)
VS Code Extension 19.87 MB 19.87 MB 📈 +0.0 KB (+0.00%)

Test Results

923 passed, 1 skipped out of 924 tests in 410.5s (+3.2s vs. baseline)

Test Coverage

23.2% line coverage, 38.9% branch coverage · ✅ no change vs. baseline

CLI Startup Time

44ms median (x64, winapp --version) · ✅ no change vs. baseline


Updated 2026-05-01 18:20:16 UTC · commit bc4b410 · workflow run

@chiaramooney
chiaramooney marked this pull request as ready for review April 24, 2026 17:00
Copilot AI review requested due to automatic review settings April 24, 2026 17:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds end-to-end CI/release support for publishing the WinApp VS Code extension (VSIX) to the Marketplace, plus automated post-publish version bumping and release-branch version overrides.

Changes:

  • Adds VSIX artifact publishing in the build template and includes the VSIX in GitHub Release assets.
  • Introduces conditional Release_VSC (publish) and Bump_VSC_Version (auto PR for patch bump) stages to the release pipeline.
  • Updates packaging/release scripts so the VS Code extension version is sourced/overridden from src/winapp-VSC/package.json.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/winapp-VSC/package.json Adds publisher metadata needed for Marketplace publishing.
scripts/start-release.ps1 Adds -VscVersion override and writes extension version to package.json on release branches.
scripts/package-vsc.ps1 Uses extension package.json version as the base version for VSIX packaging.
scripts/build-cli.ps1 Stops passing CLI version into VSIX packaging script (extension determines its own version).
.pipelines/templates/build.yaml Copies and publishes the VSIX as a pipeline artifact.
.pipelines/release.yml Adds optional VS Code Marketplace publish stage and automated version bump PR stage; uploads VSIX to GitHub Release assets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .pipelines/release.yml Outdated
Comment thread .pipelines/release.yml Outdated
Comment thread .pipelines/release.yml Outdated
Comment thread scripts/start-release.ps1 Outdated
Comment thread .pipelines/release.yml Outdated
@chiaramooney

Copy link
Copy Markdown
Contributor Author

@copilot apply changes based on the comments in this thread

Copilot AI commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Applied the unresolved review feedback in commit 369af92:

  • Boolean condition fix (lines 410 and 480): Changed ${{ if ne(parameters.SkipVscRelease, 'true') }}${{ if eq(parameters.SkipVscRelease, false) }} to correctly compare the boolean parameter instead of a string, ensuring publishing is reliably disabled by default.
  • Pinned @vscode/vsce version: Changed npm install @vscode/vscenpm install @vscode/vsce@3.9.1 --no-save --no-package-lock for deterministic, reproducible installs without creating lockfile artifacts.

Comment thread scripts/start-release.ps1 Outdated
@chiaramooney
chiaramooney requested a review from nmetulev April 29, 2026 20:28
@nmetulev
nmetulev enabled auto-merge (squash) April 29, 2026 20:42
chiaramooney and others added 3 commits April 30, 2026 15:11
- Create .pipelines/release-vsc.yml triggered by vsc-rel/v* branches
- Remove VSC stages from .pipelines/release.yml (rel/v* trigger)
- Stamp bundled CLI version into extension README during packaging
- Strip git hash suffix from CLI version for clean display

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chiaramooney and others added 3 commits April 30, 2026 15:39
- Remove skipVsc parameter from build.yaml template
- Remove skipVsc: true from release.yml build step
- Remove VscVersion parameter and related logic from start-release.ps1
- Add start-vsc-release.ps1 for standalone VSC extension releases

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Version bumping is handled by start-vsc-release.ps1 before pushing
the release branch, so the pipeline stage would duplicate it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allows running the pipeline to build the VSIX without publishing
to the VS Code Marketplace. Set SkipPublish to false to publish.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nmetulev
nmetulev enabled auto-merge (squash) May 1, 2026 17:25
@nmetulev
nmetulev disabled auto-merge May 1, 2026 18:01
@nmetulev
nmetulev merged commit a0612bf into main May 1, 2026
21 checks passed
@nmetulev
nmetulev deleted the cm/add-vsc-publish branch May 1, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants