-
Notifications
You must be signed in to change notification settings - Fork 80
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
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
153a1f6
Separate protobufs from module code
lukasIO 4bcc38e
update generate workflow
lukasIO ed6c1ff
install mage only
lukasIO 64dd945
fix paths
lukasIO 608201c
generated protobuf
github-actions[bot] a80c24f
fix test action
lukasIO 94c30a4
Merge branch 'lukas/changesets-publishing' of github.com:livekit/prot…
lukasIO 46a323c
fix cache dependency path
lukasIO 6bac626
setup versioning
lukasIO 5cb354e
add golang workspace file
lukasIO 0c67ea6
delete generated files from git
lukasIO 51a5b9c
Update gitinore
lukasIO b867900
fix release workflow
lukasIO 8dbe9bd
Move go code back to root
lukasIO 170eccb
fix working directory
lukasIO 0508f82
fix changeset script
lukasIO 2df644f
revert debug changes
lukasIO 323b7c6
remove go cache path
lukasIO 1aa3334
Merge branch 'main' into lukas/changesets-publishing
lukasIO File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": [ | ||
"@livekit/changesets-changelog-github", | ||
{ "repo": "livekit/protocol" } | ||
], | ||
"commit": false, | ||
"fixed": [["github.com/livekit/protocol", "@livekit/protocol"]], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [], | ||
"privatePackages": { "version": true, "tag": true } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,41 +17,41 @@ name: Test | |
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/go/bin | ||
~/.cache | ||
key: livekit-protocol | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Set up gotestfmt | ||
run: go install github.com/gotesttools/gotestfmt/v2/cmd/[email protected] | ||
|
||
- name: Download Go modules | ||
run: go mod download | ||
|
||
- name: Static Check | ||
uses: amarpal/staticcheck-action@master | ||
with: | ||
checks: '["all", "-ST1000", "-ST1003", "-ST1020", "-ST1021", "-ST1022", "-SA1019"]' | ||
install-go: false | ||
|
||
- name: Test | ||
run: | | ||
set -euo pipefail | ||
MallocNanoZone=0 go test -race -json -v ./... 2>&1 | gotestfmt | ||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/go/bin | ||
~/.cache | ||
key: livekit-protocol | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Set up gotestfmt | ||
run: go install github.com/gotesttools/gotestfmt/v2/cmd/[email protected] | ||
|
||
- name: Download Go modules | ||
run: go mod download | ||
|
||
- name: Static Check | ||
uses: amarpal/staticcheck-action@master | ||
with: | ||
checks: '["all", "-ST1000", "-ST1003", "-ST1020", "-ST1021", "-ST1022", "-SA1019"]' | ||
install-go: false | ||
|
||
- name: Test | ||
run: | | ||
set -euo pipefail | ||
MallocNanoZone=0 go test -race -json -v ./... 2>&1 | gotestfmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Create Release Pull Request or Publish packages | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
# This expects you to have a script called ci:publish which does a build for your packages and calls changeset publish | ||
publish: pnpm ci:publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ | |
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
.idea/ | ||
|
||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "github.com/livekit/protocol", | ||
"private": true, | ||
"version": "1.10.1", | ||
"scripts": { | ||
"changeset": "changeset", | ||
"publish:ci": "pnpm --filter @livekit/protocol run build && changeset publish" | ||
}, | ||
"devDependencies": { | ||
"@changesets/cli": "^2.27.1", | ||
"@livekit/changesets-changelog-github": "^0.0.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
src/gen | ||
!src/gen/version.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.