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

Changesets setup + auto-publish to npm #922

Merged
merged 8 commits into from Jun 5, 2023
Merged

Conversation

olayway
Copy link
Member

@olayway olayway commented Jun 5, 2023

Closes #905

Summary

This PR sets up changesets with the aim to simplify the process of documenting changes committed to the codebase, as well as automating versioning packages and publishing them to npm.

Changes

  • initialised changesets in the repository
  • (separately from this PR) installed changesets bot in the repository (it will check if a submitted PR includes a changeset file and inform if found or not)
  • added .github/workflows/release.yml: The workflow creates a PR with version bumps and related changelog
    files' updates, each time a commit containing changeset
    file(s) is added to the main branch. After merging this auto-generated PR, this workflow will also auto-publish the released packages to npm and add git tags.
  • added the following scripts to the root package.json:
    • changeset: should be run to generate changeset files, that describe changes made to the code,
    • prerelease: runs linting and testing on packages affected by the changes in a PR
    • release: runs changeset publish and is used by the release workflow then the above-mentioned auto-generated PR is merged to the main branch

TODOs

  • Double check everything is working as expected the next time we commit some changes to the repo
  • Make sure all devs are aware of it

@olayway olayway requested a review from luccasmmg June 5, 2023 13:44
@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2023

⚠️ No Changeset found

Latest commit: 3366016

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

@vercel
Copy link

vercel bot commented Jun 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

9 Ignored Deployments
Name Status Preview Comments Updated (UTC)
portaljs-alan-turing ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm
portaljs-ckan ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm
portaljs-ckan-ssg ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm
portaljs-fivethirtyeight ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm
portaljs-git-example ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm
portaljs-learn ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm
portaljs-openspending ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm
portaljs-storybook ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm
site-portaljs ⬜️ Ignored (Inspect) Jun 5, 2023 1:57pm

- link commits, PRs, and users in generated changelogs
- install @changesets/cli and @changesets/changelog-github generator
The workflow creates a PR with version bumps and related changelog
files' updates, each time a commit containing a changeset
file is added on the main branch.
Copy link
Member

@demenech demenech left a comment

Choose a reason for hiding this comment

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

@olayway LGTM. I guess we have to merge it in order to be able to test it.

@olayway olayway merged commit 688db3e into main Jun 5, 2023
10 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.

Setup changesets and auto-publish to npm
2 participants