Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add changeset validation workflow #3067

Merged
merged 14 commits into from
Aug 27, 2024
18 changes: 18 additions & 0 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Changeset

on:
pull_request:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially, thought to run workflow only if .changeset/** changes but then realized that package.json of packages may change too, causing changeset validation to fail. So now including all paths, although could still narrow down to .changeset/** and packages/**/package.json?

Copy link
Member

@holic holic Aug 27, 2024

Choose a reason for hiding this comment

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

sounds reasonable to run as-needed (just for changeset + package.json changes) although may also need to consider the pnpm-workspace.yaml (could change the scope what are considered workspace packages) and ~any package.json (e.g. **/package.json)

but also running it for every commit is fine too, should be lightweight enough to not matter much

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps then best to not restrict any paths since it is indeed lightweight, and don't want to miss anything accidentally.


jobs:
changeset:
name: Validate changeset
runs-on: depot-ubuntu-22.04-16
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Changeset
run: pnpm changeset status
Loading