Replace release-please with ADO pipelines + npm publish#43
Conversation
Remove release-please and its GitHub Actions workflows. Add Azure Pipelines for VS Code extension publishing (stable + pre-release) using microsoft/vscode-engineering templates, modeled after microsoft/vscode-kusto. Add GitHub Action for npm publishing of @microsoft/agentrc on v* tags and manual dispatch. - Delete release-please config, manifest, and workflow - Delete GHA pre-release extension workflow - Add .azure-pipelines/publish-extension.yml (stable) - Add .azure-pipelines/publish-extension-prerelease.yml (pre-release) - Add scripts/applyPatchForPrerelease.cjs (odd-minor versioning) - Add .github/workflows/publish-npm.yml (npm publish with provenance) - Add patch-prerelease scripts to both package.json files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Replaces release-please-based releases with Azure DevOps pipelines for VS Code extension publishing and a GitHub Action for npm publishing of @microsoft/agentrc.
Changes:
- Removed release-please config + workflows.
- Added ADO pipelines for stable + pre-release VS Code Marketplace publishing (with prerelease version patching).
- Added GitHub Actions workflow to publish to npm on
v*tags or manual dispatch (with dry-run + provenance).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/applyPatchForPrerelease.cjs | Adds prerelease version patching logic based on ADO build number. |
| package.json | Adds patch-prerelease script to invoke prerelease patcher. |
| eslint.config.js | Excludes scripts/** from linting. |
| .github/workflows/publish-npm.yml | Adds npm publish workflow with tag/version verification and provenance. |
| .azure-pipelines/publish-extension.yml | Adds stable VS Code extension publishing pipeline using vscode-engineering templates. |
| .azure-pipelines/publish-extension-prerelease.yml | Adds prerelease VS Code extension publishing pipeline + version patch step. |
| .github/workflows/release-please.yml | Removes release-please automation workflow. |
| .github/workflows/publish-extension-prerelease.yml | Removes prior prerelease publishing workflow. |
| release-please-config.json | Removes release-please configuration. |
| release-please-manifest.json | Removes release-please manifest. |
scripts/applyPatchForPrerelease.cjs
Outdated
| const prereleasePackageJson = Object.assign(json, { | ||
| version: `${major}.${Number(minor) + 1}.${patch}`, | ||
| }); | ||
| fs.writeFileSync(packageJsonPath, JSON.stringify(prereleasePackageJson)); |
There was a problem hiding this comment.
Writing package.json with JSON.stringify(...) without spacing (and without a trailing newline) will minify the file, creating noisy diffs and making it harder to inspect/debug. Preserve formatting by stringifying with indentation (and typically a final newline) to match repo conventions.
| fs.writeFileSync(packageJsonPath, JSON.stringify(prereleasePackageJson)); | |
| fs.writeFileSync(packageJsonPath, JSON.stringify(prereleasePackageJson, null, 2) + '\n'); |
Use azure-pipelines/npm-package/pipeline.yml template from microsoft/vscode-engineering (same pattern as vscode-copilot-chat). Supports manual version parameter (major/minor/patch/prerelease/X.X.X), multi-platform testing, and GitHub release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use NodeTool@0 task instead of corepack for Node setup - Use standardizedVersioning instead of custom patch script - Switch pre-release to schedule-based (weekdays 9:00 UTC) - Add generateNotice parameter for compliance - Add nodeVersion parameter to extension templates - Add nightly schedule + PR validation to npm pipeline - Auto-publish prerelease on nightly schedule - Remove scripts/applyPatchForPrerelease.cjs (no longer needed) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| trigger: | ||
| batch: true | ||
| branches: | ||
| include: | ||
| - main | ||
|
|
||
| schedules: | ||
| - cron: "0 7 * * *" | ||
| displayName: 🌙 Nightly prerelease build | ||
| branches: | ||
| include: | ||
| - main | ||
| always: true | ||
|
|
||
| pr: [main] | ||
|
|
There was a problem hiding this comment.
PR description says npm publishing will be handled by a GitHub Action on v* tags + manual dispatch, but this change adds an Azure Pipelines definition triggered by main/PRs and a nightly schedule. Either add the promised .github/workflows/publish-npm.yml (and adjust/remove this ADO pipeline if not needed), or update this pipeline triggers/PR description so they match the intended release process.
| ${{ if or(eq(parameters.nextVersion, 'prerelease'), eq(variables['Build.Reason'], 'Schedule')) }}: | ||
| publishPackage: true | ||
| publishRequiresApproval: false | ||
| nextVersion: prerelease | ||
| tag: next |
There was a problem hiding this comment.
This pipeline is configured to publish prereleases automatically on the scheduled run (Build.Reason == Schedule) with publishRequiresApproval: false and tag: next. If that’s not intentional, tighten the condition (e.g., require an explicit parameter) and/or require approval to avoid unintended public npm publishes from main on a timer.
| ${{ elseif eq(parameters.nextVersion, 'none') }}: | ||
| publishPackage: false | ||
| ${{ else }}: | ||
| publishPackage: true | ||
| nextVersion: ${{ parameters.nextVersion }} | ||
| ghCreateRelease: true | ||
| ghReleaseAddChangeLog: true |
There was a problem hiding this comment.
ghCreateRelease/ghReleaseAddChangeLog are always set to true even when publishPackage: false (e.g., default nextVersion: none runs). If the template honors these flags independently, this could create GitHub releases/changelogs on non-publish builds; consider gating these flags under the same condition as publishPackage (or explicitly disabling them when publishPackage is false).
| ${{ elseif eq(parameters.nextVersion, 'none') }}: | |
| publishPackage: false | |
| ${{ else }}: | |
| publishPackage: true | |
| nextVersion: ${{ parameters.nextVersion }} | |
| ghCreateRelease: true | |
| ghReleaseAddChangeLog: true | |
| ghCreateRelease: true | |
| ghReleaseAddChangeLog: true | |
| ${{ elseif eq(parameters.nextVersion, 'none') }}: | |
| publishPackage: false | |
| ghCreateRelease: false | |
| ghReleaseAddChangeLog: false | |
| ${{ else }}: | |
| publishPackage: true | |
| nextVersion: ${{ parameters.nextVersion }} | |
| ghCreateRelease: true | |
| ghReleaseAddChangeLog: true |
|
|
||
| - script: npm run build | ||
| displayName: Build CLI | ||
|
|
There was a problem hiding this comment.
The publish pipeline builds the extension but does not run the extension TypeScript typecheck (npx tsc --noEmit in vscode-extension/). The previous workflow did typecheck before packaging/publishing; adding it here helps prevent publishing a VSIX that bundles but fails typechecking.
| - script: npx tsc --noEmit | |
| displayName: Typecheck extension | |
| workingDirectory: vscode-extension |
| - name: publishExtension | ||
| displayName: 🚀 Publish Pre-Release | ||
| type: boolean | ||
| default: false |
There was a problem hiding this comment.
This prerelease pipeline has a weekday schedule but publishExtension defaults to false, so scheduled runs won’t actually publish (only build). Either set publishExtension to true for scheduled runs (if the intent is automated prerelease publishing) or remove/disable the schedule to avoid running a no-op pipeline every weekday.
| default: false | |
| default: true |
| buildSteps: | ||
| - task: NodeTool@0 | ||
| inputs: | ||
| versionSpec: 22.x | ||
| displayName: Install Node.js | ||
|
|
||
| - script: npm ci --ignore-scripts | ||
| displayName: Install root dependencies | ||
|
|
||
| - script: npm ci | ||
| displayName: Install extension dependencies | ||
| workingDirectory: vscode-extension | ||
|
|
||
| - script: npm run build | ||
| displayName: Build CLI | ||
|
|
||
| - script: node esbuild.mjs --production | ||
| displayName: Build extension | ||
| workingDirectory: vscode-extension |
There was a problem hiding this comment.
Compared to the stable publish pipeline, this prerelease pipeline does not run tests (e.g., npm run test) or an extension typecheck step. If it’s intended to publish to the Marketplace, add the same validation steps as the stable pipeline to avoid publishing untested prerelease builds.
Replace references to release-please with the new Azure DevOps pipeline setup introduced in #43: - CONTRIBUTING.md: expand Releasing section with three ADO pipelines (stable extension, pre-release extension, npm package) - CHANGELOG.md: update tooling note to reference ADO pipelines Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove release-please and replace with Azure DevOps pipelines using
microsoft/vscode-engineeringtemplates, aligned with the patterns in vscode-copilot-chat and vscode-kusto.Extension Publishing (VS Code Marketplace)
Two ADO pipelines using
azure-pipelines/extension/templates:.azure-pipelines/publish-extension.yml— Stable release. ManualpublishExtensiongate (default: false). Runs build + test on every main push..azure-pipelines/publish-extension-prerelease.yml— Pre-release. Schedule-based (weekdays 9:00 UTC). UsesstandardizedVersioning: truefor automatic version bumping.Both use
NodeTool@0,generateNotice,nodeVersion, and TSA config.npm Publishing (
@microsoft/agentrc).azure-pipelines/publish-npm.yml— Usesazure-pipelines/npm-package/pipeline.ymltemplate (same as vscode-copilot-chat'sbuild/npm-package.yml).nextVersionparameter:none,major,minor,patch,prerelease, orX.X.X.nexttag.main.Deleted
release-please-config.jsonrelease-please-manifest.json.github/workflows/release-please.yml.github/workflows/publish-extension-prerelease.ymlSetup Needed
.azure-pipelines/*.ymlfileMonacoGitHub service endpoint in ADO (or update endpoint name)areaPathandserviceTreeIDto agentrc-specific values