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

Add Changesets #1513

Merged
merged 7 commits into from
Sep 6, 2023
Merged

Add Changesets #1513

merged 7 commits into from
Sep 6, 2023

Conversation

estrattonbailey
Copy link
Member

@estrattonbailey estrattonbailey commented Aug 24, 2023

This PR adds Changesets into the mix. Changesets handles versioning, publishing, the creation of CHANGELOG.md documents, git tags and GitHub releases.

The basic process is this:

  1. You edit some files
  2. If these file edits should result in a version change to the package, add a changeset along with the other files in the commit
    1. You can add as many changesets (for as many packages as needed) to a PR as you want, they will be flattened
  3. Commit your edits and changeset(s)
  4. Push up your PR

This PR contains an example changeset atm.

From this point:

  1. You would merge your PR
  2. Changesets gathers all *.md files from .changeset dir, and creates and maintains a separate PR with the version bumps required
  3. Other PRs with other changesets may be merged in the meantime
  4. When ready to publish, we merge the Changesets maintained PR
  5. Changesets publishes all updated files to npm
  6. Changesets updates changelog files and tags
  7. Changesets commits changelogs, tags, and a release back to the repo

TODO

  • don't build images on merge to main
  • add NPM_TOKEN to this repo's secrets
  • confirm there's nothing we need to do to ensure changesets starts at our current versions (we have no git tag history or releases rn)
  • format changelogs after versioning (optional)
  • update-main-to-dist

'@atproto/api': patch
---

Testing out changesets
Copy link
Member Author

Choose a reason for hiding this comment

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

If merged, this should result in a patch for api, an update of the api package in each package that relies on it, and a patch of their versions as well.

In the CHANGELOG.md, this comment will appear along with the git hash so that changes can be easily linked to the actual edited files.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed this, but you get the idea

@estrattonbailey estrattonbailey marked this pull request as ready for review August 24, 2023 20:49
Copy link
Collaborator

@dholms dholms left a comment

Choose a reason for hiding this comment

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

this all LGTM 👍

excited to see it in action

Comment on lines +3 to +6
on:
push:
branches:
- main
Copy link
Member Author

Choose a reason for hiding this comment

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

This will run on merge into main, but will only publish if ./.changeset/*.md are present.

Comment on lines +33 to +34
commit: "Version packages"
title: "Version packages"
Copy link
Member Author

Choose a reason for hiding this comment

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

We can change these values to whatever we want

@dholms dholms merged commit b3eb3d7 into main Sep 6, 2023
10 checks passed
@dholms dholms deleted the eric/changesets branch September 6, 2023 23:37
mloar pushed a commit to mloar/atproto that referenced this pull request Sep 26, 2023
* add changesets

* clean up scripts

* remove test changeset

* only build containers on push to production, clean up other workflows

* keep building from main

* remove production branch for now
mloar pushed a commit to mloar/atproto that referenced this pull request Nov 15, 2023
* add changesets

* clean up scripts

* remove test changeset

* only build containers on push to production, clean up other workflows

* keep building from main

* remove production branch for now
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