Skip to content

DO-1994: Add shared changeset workflows#76

Open
aaronmedina-dev wants to merge 3 commits intomainfrom
feature/do-1994-shared_workflow_for_changesets
Open

DO-1994: Add shared changeset workflows#76
aaronmedina-dev wants to merge 3 commits intomainfrom
feature/do-1994-shared_workflow_for_changesets

Conversation

@aaronmedina-dev
Copy link
Contributor

@aaronmedina-dev aaronmedina-dev commented Feb 16, 2026

Description of the proposed changes

Adds three reusable workflows for automating the full Changesets lifecycle across Aligent projects. This follows the same pattern used in aligent/cdk-constructs and aligent/take-flight, extracted into shared workflows so any project can adopt them with minimal configuration.

Workflows added:

  • changeset-release.yml - Runs on pushes to main. Uses the official changesets/action to either create a version PR (when changeset files exist) or publish packages (when the version PR has been merged). Supports private and public registries, custom version/publish commands, and post-publish hooks.
  • changeset-check.yml - Runs on pull requests. Advisory check that detects when code changes affect publishable packages but no changeset has been added. Posts a comment listing affected packages with instructions, and silently removes it once a changeset is added. Uses the GitHub API to fetch changed files so no full git history is needed.
  • update-lockfile.yml - Runs on pull requests targeting version PR branches. When changesets/action bumps package.json versions, the lockfile becomes stale. This workflow regenerates and commits the lockfile so CI passes on the version PR.

Also included:

  • Documentation for each workflow under docs/
  • Adoption guide in the README covering prerequisites, caller workflow examples, secrets configuration, and the end-to-end release flow

Other solutions considered (if any)

Considered extracting the shared Node.js setup steps (checkout, setup-node, corepack, cache, pre-install) into a composite action to reduce duplication across the three workflows. However, composite actions cannot access the secrets context, so NPM_TOKEN would need to be passed as a regular input which risks leaking it in logs. The existing node-pr.yml workflow uses the same repeated-steps approach for this reason.

Notes to PR author

⚠️ Please make sure the changes adhere to the guidelines mentioned in our contribution guide.

Notes to reviewers

DO-1994: Add shared changeset workflows

Adds three reusable workflows for automating the Changesets lifecycle:
- changeset-release.yml: versioning and publishing via changesets/action
- changeset-check.yml: advisory PR comments for missing changesets
- update-lockfile.yml: auto-commits lockfile updates on version PRs

Includes documentation for each workflow and an adoption guide in the
README covering prerequisites, caller examples, secrets, and the
end-to-end release flow.
Addresses PR feedback to avoid duplicating documentation. The README
now links to the individual workflow docs which already contain inputs,
secrets, setup instructions, and example caller YAML.
… docs

Moves the prerequisites (Changesets setup, config.json, convenience
scripts) and end-to-end release flow documentation from the README into
changeset-release.md so all adoption info lives in the individual docs.
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

Comments