Skip to content

Move VS Code extension publishing to release pipeline, fix pre-release packaging#15277

Open
adamint wants to merge 1 commit intomainfrom
dev/vscode-prerelease-publish
Open

Move VS Code extension publishing to release pipeline, fix pre-release packaging#15277
adamint wants to merge 1 commit intomainfrom
dev/vscode-prerelease-publish

Conversation

@adamint
Copy link
Member

@adamint adamint commented Mar 16, 2026

Description

Move VS Code extension publishing from the build pipeline (BuildAndTest.yml) to the dedicated release pipeline (release-publish-nuget.yml), and fix pre-release packaging by passing --pre-release at vsce package time.

Root cause: vsce publish --pre-release fails with "Cannot use '--pre-release' flag with a package that was not packaged as pre-release" because --pre-release must be passed to vsce package, not just vsce publish. The flag embeds pre-release metadata in the VSIX.

Changes:

  • extension/Extension.proj: Add PackExtensionAsPreRelease MSBuild property. When true, passes --pre-release to vsce package.
  • eng/pipelines/templates/BuildAndTest.yml: Remove publish steps (PAT verify + marketplace publish). Add vscePackagePreRelease param that flows to MSBuild.
  • eng/pipelines/azure-pipelines.yml: Replace old params with single vscePackagePreRelease. Remove build-time secrets variable group.
  • eng/pipelines/release-publish-nuget.yml: Add VSCodeJob with full publish workflow (artifact download, signature verification, PAT check, dry-run support, conditional --pre-release). Add PublishVSCodeExtension, VSCodePreRelease, SkipVSCodePublish params.
  • extension/package.json: Bump version to 1.0.5.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Copilot AI review requested due to automatic review settings March 16, 2026 13:40
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15277

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15277"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Moves VS Code extension publishing responsibilities out of the main build pipeline and into the dedicated release pipeline, while adding support to correctly package VSIX artifacts as pre-release when needed (so Marketplace pre-release publishing succeeds).

Changes:

  • Add an MSBuild property to package the VSIX with vsce package --pre-release when requested.
  • Remove Marketplace publish/PAT verification from BuildAndTest.yml and plumb a packaging-only pre-release parameter through the build pipeline.
  • Add a VS Code publishing job to release-publish-nuget.yml (download artifacts, verify signature/PAT, publish or dry-run).

Reviewed changes

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

Show a summary per file
File Description
extension/package.json Bumps extension version to 1.0.5.
extension/Extension.proj Adds PackExtensionAsPreRelease and applies it to vsce package.
eng/pipelines/templates/BuildAndTest.yml Removes Marketplace publishing; forwards pre-release packaging flag into MSBuild.
eng/pipelines/azure-pipelines.yml Replaces publish-related params with packaging-only vscePackagePreRelease; removes secrets group from build pipeline.
eng/pipelines/release-publish-nuget.yml Adds VS Code publishing parameters, artifacts handling, and a Marketplace publish job.

You can also share your feedback on Copilot code review. Take the survey.

@github-actions
Copy link
Contributor

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 16d51a1:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RunWithMissingAwaitShowsHelpfulError ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #23146628612

@joperezr
Copy link
Member

@adamint can we push these changes to main branch instead? For the release, we use the definition in main of this pipeline.

…e packaging

- Add PackExtensionAsPreRelease MSBuild property to Extension.proj so
  --pre-release is passed at vsce package time (fixes the root cause)
- Remove extension publish steps from BuildAndTest.yml (build template)
- Simplify azure-pipelines.yml to single vscePackagePreRelease param
- Add full VSCodeJob to release-publish-nuget.yml with artifact download,
  signature verification, PAT check, dry-run support, and conditional
  --pre-release publishing
- Bump extension version to 1.0.5
@adamint adamint force-pushed the dev/vscode-prerelease-publish branch from 16d51a1 to 24d38a7 Compare March 19, 2026 02:52
@adamint adamint changed the base branch from release/13.2 to main March 19, 2026 02:53
@adamint
Copy link
Member Author

adamint commented Mar 19, 2026

@joperezr Done — rebased onto main and retargeted the PR. Also addressed all the Copilot review feedback (replaced npx vsce with direct vsce calls, added VSIX pre-release metadata validation, fixed SkipVSCodePublish default, fixed conditional artifact publishing). The package.json version bump is no longer in the diff since main already has 1.0.5.

@adamint adamint self-assigned this Mar 19, 2026
@adamint adamint marked this pull request as ready for review March 19, 2026 04:05
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.

3 participants