Skip to content

feat: use AddEmbeddedAttributeDefinition + changeset release flow#100

Merged
kieronlanning merged 9 commits into
mainfrom
expanding-refactorings
May 24, 2026
Merged

feat: use AddEmbeddedAttributeDefinition + changeset release flow#100
kieronlanning merged 9 commits into
mainfrom
expanding-refactorings

Conversation

@kieronlanning

Copy link
Copy Markdown
Contributor

Summary

This PR introduces two changes:

1. AddEmbeddedAttributeDefinition (source generator)

  • Uses AddEmbeddedAttributeDefinition to inject Microsoft.CodeAnalysis.EmbeddedAttribute via Roslyn's official API
  • Applies [global::Microsoft.CodeAnalysis.Embedded] to all generated marker attribute types
  • Ensures generated types are invisible to IDE tooling and consumer code (no symbol conflicts)
  • Requires Roslyn 4.14.0+ (Visual Studio 2022 17.14+ / .NET 10 SDK)
  • Runtime targets unchanged: .NET 4.8 and .NET 8+

2. Changeset-based release flow

  • Replace commit-and-tag-version with @changesets/cli
  • Draft-first releases compatible with immutable releases
  • changeset-check CI gate on all PRs
  • release-pr.yml creates Version PRs (supports GitHub App + PAT)
  • New cd.yml: tag existence check, ERR cleanup trap, immutable-safe
  • GitHub branch ruleset created (CI Gate required)
  • DSC setup scripts: scripts/setup-release.sh + scripts/setup-release.ps1
  • docs/release-process.md: complete reusable guide (all scopes x token types)

Version

The pending changeset is a minor bump - will produce v4.3.0

kieronlanning and others added 6 commits May 24, 2026 12:18
…release

commit-and-tag-version creates the git tag locally and it may be pushed
to origin (e.g. from a feature branch) before the CD pipeline runs on
the main push. Only an existing GitHub Release is a hard duplicate error.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace commit-and-tag-version with @changesets/cli + @changesets/changelog-github
- Add .changeset/config.json for kjldev/purview-telemetry-sourcegenerator
- Add pending changeset for AddEmbeddedAttributeDefinition feature (minor bump)
- Create release-pr.yml: Version PR bot with GitHub App / PAT dual-token support
- Rewrite cd.yml: draft-first release, ERR cleanup trap, immutable-release-compatible
- Update ci.yml: add changeset-check job + add to ci-gate dependencies
- Update Justfile: remove release-final/release-pre, add changeset/changeset-status
- Create docs/release-process.md: comprehensive reusable release guide
- Fix dotnet test syntax (positional path, not --solution flag)

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>
- Add scripts/setup-release.sh (bash, all scopes + token types, idempotent)
- Add scripts/setup-release.ps1 (PowerShell DSC, all scopes + token types, idempotent)
- Rewrite docs/release-process.md with full scope/token matrix, script reference,
  manual setup guide (all 4 scopes × 3 token types), ruleset CLI commands,
  GHES notes, and expanded troubleshooting
- Update wiki Contributing.md to reference DSC scripts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 24, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s release automation by adopting a Changesets-based versioning workflow (with new CI/CD workflows, docs, and setup scripts) and adds a changeset documenting the source-generator change to use Roslyn’s AddEmbeddedAttributeDefinition for embedded marker attributes.

Changes:

  • Replace the previous release/versioning approach with @changesets/cli and add required CI/CD workflows (release-pr.yml, cd.yml, and CI gating via changeset-check).
  • Add end-to-end documentation and DSC-style setup scripts (bash + PowerShell) to configure rulesets/labels/secrets for the new release flow.
  • Add Changesets configuration and an initial changeset entry for the embedded-attribute-definition generator change.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/setup-release.sh Adds bash DSC script to configure rulesets/labels/secrets for the changeset release flow.
scripts/setup-release.ps1 Adds PowerShell DSC script equivalent for release-flow setup.
README.md Adds Contributing section and points contributors to the changeset workflow docs.
package.json Switches dev tooling to Changesets and updates repo metadata URLs.
Justfile Replaces release recipes with changeset and changeset-status recipes.
docs/release-process.md Adds comprehensive, reusable documentation for the new release process.
bun.lock Updates lockfile to include Changesets dependencies and remove prior release tool dependencies.
.github/workflows/release-pr.yml Adds workflow to create/update a Changesets “Version Packages” PR on pushes to main.
.github/workflows/ci.yml Adds changeset-check gate and updates test invocation to dotnet test <solution>.
.github/workflows/cd.yml Updates CD to publish draft-first releases via gh and skip if the release already exists.
.changeset/README.md Adds generated Changesets README.
.changeset/embedded-attribute-definition.md Adds a minor changeset describing the embedded attribute definition change.
.changeset/config.json Adds Changesets configuration (GitHub changelog integration, baseBranch, etc.).

Comment thread scripts/setup-release.sh
Comment thread scripts/setup-release.sh
… actor

The GitHub Rulesets API expects the App's numeric ID as �ctor_id for
Integration bypass actors, not the installation ID. The installation ID
endpoint also requires App JWT auth rather than a user token.

Removes the installation ID lookup step entirely — APP_ID (available as
a script parameter) is passed directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kieronlanning kieronlanning enabled auto-merge (squash) May 24, 2026 14:19
auto-merge was automatically disabled May 24, 2026 14:59

Head branch was pushed to by a user without write access

@kieronlanning kieronlanning enabled auto-merge May 24, 2026 15:02
@kieronlanning kieronlanning merged commit b47b068 into main May 24, 2026
9 of 10 checks passed
@kieronlanning kieronlanning deleted the expanding-refactorings branch May 24, 2026 15:33
@kjldev-release-bot kjldev-release-bot Bot mentioned this pull request May 24, 2026
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