Skip to content

Replace release-please with ADO pipelines + npm publish#43

Merged
digitarald merged 5 commits intomainfrom
release-pipelines
Mar 6, 2026
Merged

Replace release-please with ADO pipelines + npm publish#43
digitarald merged 5 commits intomainfrom
release-pipelines

Conversation

@digitarald
Copy link
Collaborator

@digitarald digitarald commented Mar 5, 2026

Remove release-please and replace with Azure DevOps pipelines using microsoft/vscode-engineering templates, 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. Manual publishExtension gate (default: false). Runs build + test on every main push.
  • .azure-pipelines/publish-extension-prerelease.yml — Pre-release. Schedule-based (weekdays 9:00 UTC). Uses standardizedVersioning: true for automatic version bumping.

Both use NodeTool@0, generateNotice, nodeVersion, and TSA config.

npm Publishing (@microsoft/agentrc)

  • .azure-pipelines/publish-npm.yml — Uses azure-pipelines/npm-package/pipeline.yml template (same as vscode-copilot-chat's build/npm-package.yml).
  • Manual nextVersion parameter: none, major, minor, patch, prerelease, or X.X.X.
  • Nightly schedule auto-publishes prerelease to next tag.
  • PR validation builds on main.
  • Multi-platform testing (Linux, macOS, Windows).
  • Creates GitHub releases with changelog.

Deleted

File Reason
release-please-config.json No longer needed
release-please-manifest.json No longer needed
.github/workflows/release-please.yml Replaced by ADO extension pipelines
.github/workflows/publish-extension-prerelease.yml Replaced by ADO pre-release pipeline

Setup Needed

  • Create ADO pipeline definitions pointing at each .azure-pipelines/*.yml file
  • Configure Monaco GitHub service endpoint in ADO (or update endpoint name)
  • Update TSA areaPath and serviceTreeID to agentrc-specific values

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>
@digitarald digitarald requested a review from pierceboggan as a code owner March 5, 2026 23:32
Copilot AI review requested due to automatic review settings March 5, 2026 23:32
Copy link

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

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.

const prereleasePackageJson = Object.assign(json, {
version: `${major}.${Number(minor) + 1}.${patch}`,
});
fs.writeFileSync(packageJsonPath, JSON.stringify(prereleasePackageJson));
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
fs.writeFileSync(packageJsonPath, JSON.stringify(prereleasePackageJson));
fs.writeFileSync(packageJsonPath, JSON.stringify(prereleasePackageJson, null, 2) + '\n');

Copilot uses AI. Check for mistakes.
Harald Kirschner and others added 2 commits March 5, 2026 15:59
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>
Copilot AI review requested due to automatic review settings March 6, 2026 00:04
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link

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

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

Comment on lines +1 to +16
trigger:
batch: true
branches:
include:
- main

schedules:
- cron: "0 7 * * *"
displayName: 🌙 Nightly prerelease build
branches:
include:
- main
always: true

pr: [main]

Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +65 to +69
${{ if or(eq(parameters.nextVersion, 'prerelease'), eq(variables['Build.Reason'], 'Schedule')) }}:
publishPackage: true
publishRequiresApproval: false
nextVersion: prerelease
tag: next
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +70 to +76
${{ elseif eq(parameters.nextVersion, 'none') }}:
publishPackage: false
${{ else }}:
publishPackage: true
nextVersion: ${{ parameters.nextVersion }}
ghCreateRelease: true
ghReleaseAddChangeLog: true
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
${{ 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

Copilot uses AI. Check for mistakes.

- script: npm run build
displayName: Build CLI

Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- script: npx tsc --noEmit
displayName: Typecheck extension
workingDirectory: vscode-extension

Copilot uses AI. Check for mistakes.
- name: publishExtension
displayName: 🚀 Publish Pre-Release
type: boolean
default: false
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
default: false
default: true

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +56
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
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@digitarald digitarald merged commit ee44cd8 into main Mar 6, 2026
11 checks passed
@digitarald digitarald deleted the release-pipelines branch March 6, 2026 15:23
github-actions bot pushed a commit that referenced this pull request Mar 6, 2026
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>
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