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.

105 lines
3.8 KiB

  1. # Collaborator Guide
  2. ## Table of Contents
  3. * [Releases](#releases)
  4. * [Getting dependencies](#getting-dependencies)
  5. * [npm access](#npm-access)
  6. * [GitHub personal access token](#github-personal-access-token)
  7. * [Deciding what type of version release](#deciding-what-type-of-version-release)
  8. * [Doing a release](#doing-a-release)
  9. * [Doc credit](#doc-credit)
  10. ## Releases
  11. Releasing http-streaming is partially automated through various scripts.
  12. To do a release, you need a couple of things: npm access, GitHub personal access token.
  13. Releases are done on npm and GitHub and eventually posted on the CDN.
  14. These are the instructions for the npm/GitHub releases.
  15. ### Getting dependencies
  16. #### npm access
  17. To see who currently has access run this:
  18. ```sh
  19. npm owner ls @videojs/http-streaming
  20. ```
  21. If you are a core committer, you can request access to npm from one of the current owners.
  22. Access is managed via an [npm organization][npm org] for [Video.js][vjs npm].
  23. #### GitHub personal access token
  24. This is used to make a GitHub release on videojs. You can get a token from the [personal access tokens](https://github.com/settings/tokens) page.
  25. After generating one, make sure to keep it safe because GitHub will not show the token for you again. A good place to save it is Lastpass Secure Notes.
  26. ### Deciding what type of version release
  27. Since we follow the [conventional changelog conventions][conventions], all commits are prepended with a type, most commonly `feat` and `fix`.
  28. If all the commits are fix or other types such as `test` or `chore`, then the release will be a `patch` release.
  29. If there's even one `feat`, the release will be a `minor` release.
  30. If any commit has a `BREAKING CHANGE` footer, then the release will be a `major` release.
  31. Most common releases will be either `patch` or `minor`.
  32. ### Doing a release
  33. 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.
  34. ```sh
  35. git clone git@github.com:videojs/http-streaming vhs-release
  36. cd vhs-release
  37. ```
  38. 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).
  39. ```sh
  40. nvm install
  41. ```
  42. Install dependencies for the project.
  43. ```sh
  44. npm install
  45. ```
  46. Then, it's mostly a standard npm package release process with running `npm version`, followed by an `npm publish`.
  47. ```sh
  48. npm version {major|minor|patch}
  49. ```
  50. Depending on the commits that have been merged, you can choose from `major`, `minor`, or `patch` as the versioning values.
  51. See [deciding what type of version release section](#deciding-what-type-of-version-release).
  52. Optionally, you can run `git show` now to verify that the version update and CHANGELOG automation worked as expected.
  53. Afterwards, you want to push the commit and the tag to the repo.
  54. It's necessary to do this before running `npm publish` because our GitHub release automation relies on the commit being available on GitHub.
  55. ```sh
  56. git push --follow-tags origin master
  57. ```
  58. Publish to npm.
  59. ```sh
  60. npm publish
  61. ```
  62. After it's done, [create a release in github](https://github.com/videojs/http-streaming/releases/new) with latest tag, no title, description copied from [the changelog](https://github.com/videojs/http-streaming/blob/master/CHANGELOG.md), and the .min.js and .js dist files attached.
  63. If it's a large enough release, consider writing a blog post as well.
  64. ## Doc credit
  65. This collaborator guide was heavily inspired by [node.js's guide](https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md) and [video.js's guide](https://github.com/videojs/video.js/blob/master/COLLABORATOR_GUIDE.md)
  66. [conventions]: https://github.com/videojs/conventional-changelog-videojs/blob/master/convention.md
  67. [vjs npm]: http://npmjs.com/org/videojs
  68. [npm org]: https://docs.npmjs.com/misc/orgs