Skip to content

feat(release): tag-driven release flow - #343

Merged
martinsafsten-codescene merged 4 commits into
mainfrom
feature/tag-driven-release
Oct 29, 2026
Merged

martinsafsten-codescene merged 4 commits into
mainfrom
feature/tag-driven-release

Conversation

@martinsafsten-codescene

@martinsafsten-codescene martinsafsten-codescene commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adopts the tag-driven release flow of codescene-mcp-server / codescene-vscode PR #385 for the Visual Studio extension. A stable release is now cut by pushing an annotated vX.Y.Z tag on a green PR merge commit on main; no version, changelog or release-notes edits are made beforehand.

This branch carries three commits: the earlier removal of CHANGELOG.md and release.ps1, the split of PR/main CI into test.yml, and the feature commit below.

What the feature commit does

  • Rewrites .github/workflows/github-release.yml as the release-only workflow. Stable tags run: resolve metadata, build VSIX, create release (not latest), upload assets, verify tests passed, publish to the Visual Studio Marketplace, record the released version on main, and finally mark the release as latest. Test tags (vX.Y.Z-test.<sha>) stop after upload. A workflow_dispatch dry_run mode exercises metadata and the publish step without creating anything.
  • Moves the release logic out of YAML into a PowerShell module (.github/release-flow.psm1, .github/release-flow/, entry script .github/release-flow.ps1) so it can be tested.
  • Adds the assertion harness (.github/test-release-flow.ps1, .github/test-release-flow/) and a make test-release-flow target, which runs under both PowerShell 7 and Windows PowerShell 5.1 and is included in make iter.
  • Adds .github/release.yml (generated release-notes categories by label) and .github/RELEASING.md (the runbook).
  • Adds .github/migrate-changelog-to-releases.ps1 to migrate the retired CHANGELOG.md history into GitHub releases.
  • Adds BUMP support to tag-test-release.ps1 and removes the retired validate-test-release-tag.ps1 and write-test-release-notes.ps1.
  • Updates README.md and SETUP.md.

Reviewer notes

  • The release is created as not latest and promoted last, so "latest" never points at a version that failed to publish.
  • The test gate requires a green Run tests run for the tagged commit. Tags must point at the PR merge commit, never at the chore(release): set version to ... bot commit, because pushes made with GITHUB_TOKEN start no workflow and that commit has no test run.
  • Runs are serialised by a github-release concurrency group; queued runs are kept, not cancelled.
  • vsix-publish.yml is intentionally kept in this PR. It will be removed in a follow-up once the Azure dry-run proves the new publish path.

Test coverage

  • make test-release-flow runs the assertion harness (admission, changelog, dispatch rules, release selection, version files/record, GitHub command construction, Marketplace publish, migration script, tag scripts, entry script) under pwsh and powershell.exe.
  • The workflow itself cannot be exercised end to end until the items below are done; the dry run covers the publish path.

Developer-owned steps (not done by this PR)

No Azure credential change is needed: the existing federated credential matches repo:codescene-oss/codescene-vs:* and is pinned by repository and owner ID.

  • Run a dry_run workflow dispatch to prove the Marketplace publish path.
  • Follow-up PR removing vsix-publish.yml after the dry-run proof.
  • Run the migration script as a dry run, then with --apply, by a maintainer.
  • Optionally create the release-notes labels used by .github/release.yml.
  • Close PR Add tagged test release workflow #324.

🤖 Generated with Claude Code

Move the PR and main-push CI out of github-release.yml into its own
'Run tests' workflow, keeping the Fetch Docs and Web Assets and Build and
Test VSIX job and check names. github-release.yml becomes tag-triggered
only for now, so tag releases keep working until the release workflow
is rewritten.
Rewrite github-release.yml as the release-only workflow driven by version
tags, with the release logic in a tested PowerShell module
(.github/release-flow.psm1, .github/release-flow/, .github/release-flow.ps1).

- Add the assertion harness (.github/test-release-flow.ps1,
  .github/test-release-flow/) and a make test-release-flow target.
- Add .github/release.yml for generated release notes categories and
  .github/RELEASING.md describing the flow.
- Add .github/migrate-changelog-to-releases.ps1 to migrate the retired
  CHANGELOG.md history into GitHub releases.
- Add BUMP support to tag-test-release.ps1.
- Remove the retired validate-test-release-tag.ps1 and
  write-test-release-notes.ps1 scripts.
- Update README.md and SETUP.md.

vsix-publish.yml is intentionally kept for now.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

The publishing Azure federated credential already matches any subject under
repo:codescene-oss/codescene-vs:* and is pinned by repository and owner ID,
so tag and dispatch runs can log in without a dedicated environment subject.
Document that in RELEASING.md.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Passed
4 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Coverage Gates Passed
New & Changed Code Coverage: 100% (required = 95%)

Review details by gate
  • New & Changed Code Coverage
    • Pass/Fail Reason:
      No executable lines of code changed. (The change touched 1 files).

@martinsafsten-codescene
martinsafsten-codescene marked this pull request as ready for review October 29, 2026 08:28
@martinsafsten-codescene
martinsafsten-codescene merged commit b1259d1 into main Oct 29, 2026
5 checks passed
@martinsafsten-codescene
martinsafsten-codescene deleted the feature/tag-driven-release branch October 29, 2026 11:37
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