-
Notifications
You must be signed in to change notification settings - Fork 5.9k
feat: publish beta and development tags on npm #4769
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4769 +/- ##
=======================================
Coverage 69.18% 69.18%
=======================================
Files 29 29
Lines 1652 1652
Branches 363 363
=======================================
Hits 1143 1143
Misses 432 432
Partials 77 77 Continue to review full report at Codecov.
|
✨ Coder.com for PR #4769 deployed! It will be updated on every commit.
|
cbb934c
to
4cf7b45
Compare
4cf7b45
to
2704db1
Compare
2704db1
to
a39ee75
Compare
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.
This works! See published version here: https://www.npmjs.com/package/code-server/v/4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040
I would like a second opinion on the implementation. There are ways we can refactor this but I am unsure if it's necessary.
This adds new log to publish the npm package both while working on PRs and when PRs are merged into main, allowing us to easily test changes in a production-like setting.
409dada
to
37c2a8a
Compare
Co-authored-by: Asher <[email protected]>
Co-authored-by: Asher <[email protected]>
* feat: add logic to publish beta/dev npm This adds new log to publish the npm package both while working on PRs and when PRs are merged into main, allowing us to easily test changes in a production-like setting. Co-authored-by: Asher <[email protected]>
Changes
This PR makes two major changes to how we release the npm package.
PRs are published with PR number and commit
When a PR is opened into
main
, we publish the npm package under a tag with the PR number. For example, you could install code-server based on #4768 and the commit 1a44d9b by running:If you needed to install a previous commit on the same PR, you can get more specific and run this:
This allows developers to test PR changes in a production setting by installing code-server locally with a specific tag.
Merges into
main
are published on npm under thebeta
tagAnytime a PR is merged into the
main
branch, it triggers a GitHub Actions workflow to publish those changes as an npm package tagged withbeta
.This allows anyone using code-server to use the bleeding edge version by running
yarn global add code-server@beta
. The benefit of this is allowing both users and maintainers to test new features before a release.Screenshots
Testing
You can test the development version from this PR here. To install locally run:
Questions
Is there a limit to how often we can publish to npm?
According to S/O, no:
Fixes #4744