To run this repo locally, run yarn
to install and link dependencies.
For dev testing, run yarn dev
. By default, this only runs the packages.
To run examples, you'll want to run run a yarn dev
in the example folder of your choice or modify the dev
script in the top level package.json.
Examples:
- To run all examples
- include
--scope 'demo-*'
in the dev script - Run
npx lerna run dev --scope 'demo-*'
locally after runningyarn dev
- include
- To only run
vanilla-ts-esm
demo- include
--scope '*-esm'
in the dev script - Run
npx lerna run dev --scope '*-esm'
locally after runningyarn dev
- include
It's helpful to point at Media Chrome canaries for developing PRs and having all the live examples work; however, we should not merge any PRs that point at a Media Chrome Canary release.
cd ./my-clean-elements-repo && yarn install
- Run
yarn version:update
and review version change proposals for accuracy - Visit the GitHub Actions tab for elements
- In the left sidebar, select the Deployment action
- Click the "Run workflow" dropdown and "Run workflow" on the
main
branch - Confirm successful releases at GitHub and NPM
- Update impacted project dependencies (ie. stream.new, docs.mux.com, mux.com)
- Update any related documentation and changelog notes
- Post in #player channel
This repo uses Conventional Commits and GitHub Actions for continuously publishing Mux elements.
If you're unfamiliar with conventional commits, it's a good idea to review the link above before continuing.
Here's a quick summary of how we use conventional commits in this repository:
- Commit messages prefixed with
fix:
will notify CD that the release is minimally apatch
release. - Commit messages prefixed with
feat:
will notify CD that the release is minimally aminor
release. - Commit messages containing
BREAKING CHANGE
in the footer will notify CD that the release is minimally amajor
release. - All other conventional commits have no impact on the versioning.
It's critical to only release from a fresh copy of the muxinc/elements
repo. There should be no divergence from what is published on the main
branch on GitHub.
One way you might consider working is to have a local clone of muxinc/elements
that you only use to release. That way, you'll never publish code that isn't intended to be released.
cd
into theelements
directory where the origin is set tomuxinc/elements
. Don't use your forked repo; use a separate directory that is cloned fromhttps://github.com/muxinc/elements
.- From the workspace root directory, run
yarn install
.
Automated tooling will decide what the new version numbers should be based on the conventional commits used since last release. Don't worry; you'll be prompted with the version numbers and can confirm that they look correct before publishing.
- From the workspace root directory, run
yarn version:update
.
Review the version changes to ensure they meet your expectations. You can abort this process with n
or proceed with y
and hit Enter
.
Note: We want the mux-player and mux-player-react versions to always be in sync. If they don't match, you should edit them manually so that they are the same version value.
This will bump the version of the packages changed since the last release and push those changes to GitHub.
You might have to manually correct the version if the suggestion of Conventional Commits is not right.
- Visit the GitHub Actions tab for elements
- From the left sidebar, select the Deployment action [ screenshot ]
- Click the Run workflow dropdown and Run workflow on the
main
branch
This will kick off the deploy action, which will publish all of the updated packages to NPM and create release notes in GitHub.
- Confirm the releases were successfully published by visiting the GitHub Releases tab
- Confirm the package(s) were successfully published to npm by checking the latest version and publish time on npmjs, e.g.: https://www.npmjs.com/package/@mux/mux-player
Update the dependencies that we use across our projects and any references made in public documentation.
- Upgrade versions of mux-player and (maybe?) mux-uploader on stream.new
- Update the
mux-player
version in the docs.mux.compackage.json
- Update the Mux Player guide in the docs (document any new functionality, add release notes at the bottom)
- Update the
mux-player
version in the mux.compackage.json
- Post in #player to let product team know you've released a new version. Consider using an Alphorn. RIIIIIiiiiicoooollaaaaaa