You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
3.2 KiB

  1. # Collaborator Guide
  2. ## Table of Contents
  3. * [Releases](#releases)
  4. * [Getting dependencies](#getting-dependencies)
  5. * [npm access](#npm-access)
  6. * [Deciding what type of version release](#deciding-what-type-of-version-release)
  7. * [Doing a release](#doing-a-release)
  8. * [Doc credit](#doc-credit)
  9. ## Releases
  10. Releasing http-streaming is partially automated through various scripts.
  11. To do a release, you need a couple of things: npm access, GitHub personal access token.
  12. Releases are done on npm and GitHub and eventually posted on the CDN.
  13. These are the instructions for the npm/GitHub releases.
  14. ### Getting dependencies
  15. #### npm access
  16. To see who currently has access run this:
  17. ```sh
  18. npm owner ls @videojs/http-streaming
  19. ```
  20. If you are a core committer, you can request access to npm from one of the current owners.
  21. Access is managed via an [npm organization][npm org] for [Video.js][vjs npm].
  22. ### Deciding what type of version release
  23. Since we follow the [conventional changelog conventions][conventions], all commits are prepended with a type, most commonly `feat` and `fix`.
  24. If all the commits are fix or other types such as `test` or `chore`, then the release will be a `patch` release.
  25. If there's even one `feat`, the release will be a `minor` release.
  26. If any commit has a `BREAKING CHANGE` footer, then the release will be a `major` release.
  27. Most common releases will be either `patch` or `minor`.
  28. ### Doing a release
  29. To make the release process easier, and in case you have a dirty repo from development, it is recommended that you checkout a clean clone of http-streaming.
  30. ```sh
  31. git clone git@github.com:videojs/http-streaming vhs-release
  32. cd vhs-release
  33. ```
  34. Install the latest compatible version of node for the project. By not specifying a version, [nvm will default to the .nvmrc file if available](https://github.com/creationix/nvm#nvmrc).
  35. ```sh
  36. nvm install
  37. ```
  38. Install dependencies for the project.
  39. ```sh
  40. npm install
  41. ```
  42. Update version.
  43. ```sh
  44. npm version {major|minor|patch}
  45. ```
  46. Depending on the commits that have been merged, you can choose from `major`, `minor`, or `patch` as the versioning values.
  47. See [deciding what type of version release section](#deciding-what-type-of-version-release).
  48. Optionally, you can run `git show` now to verify that the version update and CHANGELOG automation worked as expected.
  49. Afterwards, you want to push the commit and the tag to the repo.
  50. ```sh
  51. git push --follow-tags origin main
  52. ```
  53. After the tag was pushed, GitHub actions will trigger the `release` workflow, which will do the following:
  54. * Publish to npm with `next` or `next-{n}` depending on your current major version.
  55. * Create GitHub release with changelog and Netlify preview.
  56. * Create a GitHub `releases` discussion linked to the GitHub release.
  57. If it's a large enough release, consider writing a blog post as well.
  58. ## Doc credit
  59. This collaborator guide was heavily inspired by [node.js's guide](https://github.com/nodejs/node/blob/main/COLLABORATOR_GUIDE.md) and [video.js's guide](https://github.com/videojs/video.js/blob/main/COLLABORATOR_GUIDE.md)
  60. [conventions]: https://github.com/videojs/conventional-changelog-videojs/blob/main/convention.md
  61. [vjs npm]: http://npmjs.com/org/videojs
  62. [npm org]: https://docs.npmjs.com/misc/orgs