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

Separate protobufs and set up changesets publishing workflow #629

Merged
merged 19 commits into from
Mar 8, 2024

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Mar 6, 2024

Set up changesets to track both the go module and the javascript package.
I declared them as fixed in the changesets config so that if either one gets version bumped, the other will as well.

Moved all .proto files into ./protobufs.

The release action will automatically publish the javascript package to npm and generate a git tag (which is practically also a release of the go module) whenever the Version Packages PR gets merged into main.
This PR will automatically be created when the release action detects a new changeset in the repo.

For changes that should cause a version bump, either

  • run pnpm changeset locally within the repo and commit the changeset or
  • use the changesets github bot that will automatically comment on PRs to create a changeset on the fly

@lukasIO lukasIO changed the title Separate protobufs from module code Separate protobufs and set up changesets publishing workflow Mar 6, 2024
@lukasIO lukasIO marked this pull request as ready for review March 6, 2024 13:35
@lukasIO lukasIO requested a review from paulwe March 6, 2024 13:40
Copy link
Contributor

@dennwc dennwc left a comment

Choose a reason for hiding this comment

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

Only one nit for cache-dependency-path, LGTM!

.github/workflows/buildtest.yaml Outdated Show resolved Hide resolved
{
"name": "github.com/livekit/protocol",
"private": true,
"version": "1.10.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Would we need to update the version here when tagging a new release?

Same question for packages/javascript/package.json.

What's the difference between the two, btw? It's for compatibility, I assume?

Copy link
Contributor Author

@lukasIO lukasIO Mar 6, 2024

Choose a reason for hiding this comment

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

No, this will automatically be done by the changesets PR.
Here's an example of what that looks like on the client-sdk-js.
Once merged, the release action will create the git tag.

One (the one in the javascript folder) is for tracking the changes of the JS package, the other one (in root) will track the golang module.

@lukasIO
Copy link
Contributor Author

lukasIO commented Mar 6, 2024

hm, not sure why the test action started to fail with 323b7c6. Failures look unrelated

@lukasIO
Copy link
Contributor Author

lukasIO commented Mar 7, 2024

re-run of the tests was successful

@lukasIO lukasIO merged commit c04669a into main Mar 8, 2024
3 checks passed
@lukasIO lukasIO deleted the lukas/changesets-publishing branch March 8, 2024 09:37
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.

3 participants