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

Setup changesets and auto-publish to npm #905

Closed
2 tasks
rufuspollock opened this issue May 26, 2023 · 0 comments · Fixed by #922
Closed
2 tasks

Setup changesets and auto-publish to npm #905

rufuspollock opened this issue May 26, 2023 · 0 comments · Fixed by #922
Assignees

Comments

@rufuspollock
Copy link
Member

Add support for changesets and auto-publish to npm

Acceptance

  • changesets support
  • Auto publish to npm

Tasks

...

olayway added a commit that referenced this issue 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](https://github.com/changesets/changesets) in the repository
- (separately from this PR) installed [changesets bot](https://github.com/apps/changeset-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
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 a pull request may close this issue.

2 participants