Skip to content

🚀 feat: implement automated release management with Changesets#1512

Merged
daniel-vdp merged 14 commits into
mainfrom
feature/release-management-with-changesets
Jul 24, 2025
Merged

🚀 feat: implement automated release management with Changesets#1512
daniel-vdp merged 14 commits into
mainfrom
feature/release-management-with-changesets

Conversation

@daniel-vdp

@daniel-vdp daniel-vdp commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

🎯 Summary

This PR introduces automated release management using Changesets, replacing our manual release workflow with a more streamlined, developer-friendly approach! 🎉

🔄 What's Changed

✨ New Features

  • Changesets Integration 📦
    • Configured Changesets with GitHub integration for automated releases
    • Added PR validation workflow to ensure changesets are included
    • Integrated with Nx for monorepo-aware versioning

🛠️ Workflow Updates

  • Automated Release Workflow 🤖
    • Creates release PRs automatically when changesets are merged
    • Publishes to NPM with proper versioning
    • Generates GitHub releases with changelogs
    • Now only triggers on main branch

🔒 Security Improvements

  • Pinned changesets/action to commit hash e0145ed (v1.5.3) for enhanced security
  • Following best practices for GitHub Actions

📚 Documentation

  • Updated CONTRIBUTING.md with comprehensive Changesets workflow guide
  • Added examples for different types of changes
  • Included Nx-specific considerations

🧪 Testing

The new workflows have been configured to:

  • ✅ Validate changesets on all PRs
  • ✅ Build and test all packages before release
  • ✅ Generate proper GitHub releases with changelogs

🎪 How It Works

  1. Developer creates a changeset 🎨

    yarn changeset
  2. PR validation ensures changeset exists 👀

  3. On merge to main 🚢

    • Changesets action creates/updates a release PR
    • When release PR is merged, packages are published to NPM
    • GitHub releases are automatically created

🏃‍♂️ Migration Notes

  • Aligned all package versions with current NPM published versions
  • No breaking changes for package consumers
  • Developers now need to include changesets with their PRs

📋 Checklist

  • Changesets configured with GitHub integration
  • PR validation workflow implemented
  • Release workflow automated
  • Documentation updated
  • Security best practices applied (commit hash pinning)
  • Package versions aligned with NPM

Daniel van der Ploeg and others added 11 commits July 22, 2025 16:38
- Add @changesets/cli for automated versioning
- Add @changesets/changelog-github for rich GitHub integration
- Install dependencies for enhanced release workflow

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Initialize Changesets configuration with GitHub changelog integration
- Set access to public for NPM publishing
- Configure repo: aligent/cdk-constructs for proper PR/commit linking
- Add Changesets README with usage instructions

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove old manual tag-based release workflow
- Add new Changesets-powered release workflow
- Enable automatic GitHub releases with generated changelogs
- Add proper permissions and git configuration
- Support both main and feature branch releases
- Include comprehensive testing before publishing

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create automated changeset validation for pull requests
- Use Nx affected detection for accurate package identification
- Map Nx project names to publishable package names
- Add intelligent PR comments showing affected packages
- Validate changeset coverage for all affected packages
- Include helpful commands and tips in PR comments
- Auto-update comments when changesets are added/removed

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add Nx affected detection to developer workflow
- Include yarn affected:packages command for accurate package detection
- Update release process documentation for Changesets automation
- Add guidance on using Nx dependency graph analysis
- Document new workflow: check affected packages → create changesets
- Add pro tips for accurate changeset creation

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- graphql-mesh-server: 0.0.1 → 3.1.1
- cloudfront-security-headers: 2.0.0 → 0.4.0
- header-change-detection: (missing) → 1.6.1
- feature-env-handlers: 2.0.1 → 2.1.0
- prerender-fargate: 2.5.1 → 2.11.0
- prerender-proxy: 2.1.4 → 2.4.2
- geoip-redirect: 0.1.0 → 1.1.1
- static-hosting: 2.7.2 → 2.8.2
- basic-auth: 2.0.0 → 0.2.1
- shared-vpc: 2.0.0 → 0.2.0
- rabbitmq: 2.0.0 → 0.2.0
- esbuild: 2.3.0 → 2.4.1
- waf: 2.2.0 → 2.3.0

All local package.json versions now match their NPM published versions exactly.

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@daniel-vdp daniel-vdp marked this pull request as ready for review July 23, 2025 01:38
@daniel-vdp daniel-vdp requested a review from a team as a code owner July 23, 2025 01:38
@daniel-vdp daniel-vdp requested review from NgaNaNa and crispy101 July 23, 2025 01:38
- Check for any changeset files before requiring affected packages
- This handles cases where infrastructure changes include changesets
- Resolves issue where pipeline incorrectly reported no changeset
@github-actions

Copy link
Copy Markdown
Contributor

Changeset detected - Thanks for adding release notes!

- Remove hardcoded CDK construct package list from changeset-check workflow
- Update npm affected:packages script to use dynamic discovery
- Use find command to discover all packages in /packages/ directory
- Automatically handles new packages without code changes
- Fixes issue with non-existent 'prerender-alpine' package in hardcoded list
- Discovered 13 actual packages vs 14 in hardcoded list
@daniel-vdp daniel-vdp force-pushed the feature/release-management-with-changesets branch from 71560d5 to fbe3590 Compare July 23, 2025 02:16
crispy101
crispy101 previously approved these changes Jul 24, 2025

@crispy101 crispy101 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.

LGTM

@crispy101 crispy101 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.

LGTM

@daniel-vdp daniel-vdp merged commit 59084e6 into main Jul 24, 2025
5 checks passed
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.

2 participants