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
Merged

Conversation

karooolis
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Aug 27, 2024

⚠️ No Changeset found

Latest commit: 5fc45e4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

uses: ./.github/actions/setup

- name: Changeset
run: pnpm changeset status --since origin/main
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have to do it like this due to base branch set as main. Relevant issue: changesets/changesets#1055

@karooolis karooolis marked this pull request as ready for review August 27, 2024 09:48
@karooolis karooolis merged commit da79454 into main Aug 27, 2024
14 checks passed
@karooolis karooolis deleted the kumpis/validate-changeset branch August 27, 2024 10:03
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