Skip to content

feat(release): channel-aware workflows + RELEASING runbook (Phase 1)#412

Draft
vicperdana wants to merge 3 commits intomainfrom
feat/release-workflow-enhancements
Draft

feat(release): channel-aware workflows + RELEASING runbook (Phase 1)#412
vicperdana wants to merge 3 commits intomainfrom
feat/release-workflow-enhancements

Conversation

@vicperdana
Copy link
Copy Markdown
Contributor

First slice of the release-strategy work. Sets up everything needed to cut tag-triggered stable + preview releases of all three packages, but doesn't yet publish anything.

What's in this PR

New: scripts/extract-release-notes.ps1

Shared CHANGELOG section extractor. Matches ## v{Version} (with optional date or (pre-release) suffix), emits body until the next ## heading. Used by all three release workflows. Tested locally against current CHANGELOGs.

Enhanced workflows

All three release-*.yml now:

  • Parse the tag into base version + optional preview suffix.
  • Validate the base version against the package manifest (PSDocs.psd1 / PSDocs.Azure.psd1 / package.json) — fail-fast on mismatch.
  • Extract per-version notes from the right CHANGELOG and pass them via --notes-file to gh release create.
  • Mark the GitHub Release as --prerelease for preview tags.

VS Code is special: the Marketplace doesn't accept SemVer prerelease suffixes in package.json, so channel is encoded via tag prefix:

  • vscode-vX.Y.Z → stable, publishes to vicperdana.psdocs-vscode
  • vscode-preview-vX.Y.Z → preview, publishes to vicperdana.psdocs-vscode-preview with vsce publish --pre-release

New: RELEASING.md

End-to-end runbook covering one-time secret setup (PSGALLERY_API_KEY, VSCE_PAT), the release GitHub Environment with required reviewers, per-package release steps, pre-release flow, troubleshooting + rollback.

Out of scope (follow-up PRs)

  • Phase 1 finish: README/CONTRIBUTING links to RELEASING.md
  • Phase 2: replace stale docs/release.md, GitHub Wiki publish doc, subtree-pull guidance
  • Phase 3: manifest URI updates, dry-run input, initial cutover, deprecation banners on upstream repos

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

vicperdana and others added 3 commits April 22, 2026 23:03
Phase 1 of the release-strategy work.

- Add scripts/extract-release-notes.ps1: shared CHANGELOG section
  extractor consumed by all three release workflows.
- release-psdocs.yml / release-psdocs-azure.yml:
  - Parse tag into base version + optional preview suffix.
  - Validate base version against PSDocs.psd1 / PSDocs.Azure.psd1
    ModuleVersion (fail fast on mismatch).
  - Extract per-version notes from CHANGELOG.md and pass via
    --notes-file to gh release create.
  - Mark GitHub Release as --prerelease when tag carries a SemVer
    prerelease suffix.
- release-vscode.yml:
  - Two-tag-prefix design (vscode-v* stable + vscode-preview-v*
    preview) because VS Marketplace does not accept SemVer
    prerelease suffixes in package.json version.
  - Validate version against package.json.
  - Route channel through the build's existing -Channel param so
    preview publishes as vicperdana.psdocs-vscode-preview.
- Add RELEASING.md: end-to-end runbook covering one-time secret +
  environment setup (PSGALLERY_API_KEY, VSCE_PAT, release env with
  required reviewers), per-package release steps, pre-release flow,
  troubleshooting, and rollback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Phase 1 finish + Phase 2 of the release-strategy work.

- README.md: add 'see RELEASING.md' line under 'Changes and versioning'.
- CONTRIBUTING.md: replace stale 'docs/release.md' link with link to
  RELEASING.md.
- docs/release.md: replace ADO-flavored release doc (referenced obsolete
  Azure DevOps build numbers like 0.2.0-B2103003) with a stub pointing
  to RELEASING.md.
- docs/publish/devops-wiki.md: page was a 'Coming soon' stub; expand it
  with both Azure Pipelines and GitHub Actions tabs covering the same
  scenario, matching the convention used elsewhere in the docs.
- MONOREPO_MIGRATION.md: under 'Future Subtree Updates', add a callout
  reminding maintainers to delete upstream .azure-pipelines/ and nested
  .github/ directories after each subtree pull (the monorepo uses GH
  Actions only at the repo root).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Phase 3 code-side work for the release-strategy.

- Add workflow_dispatch trigger to all three release-*.yml workflows
  with two inputs: 'tag' (string, required) and 'dry_run' (boolean,
  default true). When dry_run=true the workflows still parse the tag,
  validate the manifest, extract CHANGELOG notes, and build the
  package, but skip Publish-Module / vsce publish / gh release create
  and instead print a summary step. Lets maintainers sanity-check a
  release end-to-end without producing any artifacts on PSGallery,
  the VS Marketplace, or GitHub Releases.

- Replace 'github.ref_name' with 'inputs.tag || github.ref_name' so
  push and dispatch paths share one code path.

- packages/psdocs/src/PSDocs/PSDocs.psd1: redirect ProjectUri,
  LicenseUri, and ReleaseNotes from microsoft/PSDocs to the new
  monorepo (Azure/PSDocs.Azure/tree/main/packages/psdocs and the
  package's CHANGELOG). PSDocs.Azure.psd1 was already correct.

- RELEASING.md: add a 'Pre-flight: dry-run' section that explains
  when and how to use the new dispatch trigger.

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.

1 participant