The below commits set-up changesets for version management of our packages and the creation of a PR to help in automated publishing. Additionally it adds a workflow for nightly snapshot publishing (at 2 AM UTC) if there have been commits in the past 24 hours.
To complete set-up the following steps must be taken by the repository maintainer:
[ ] Add a GITHUB_TOKEN to the repository secrets to be able to merge the stable releases back into main
[ ] Add an NPM_TOKEN without 2FA for publishing (though 2FA for authentication is possible) to the repository secrets to allow the changesets tool to publish to NPM
[ ] Add the changeset-bot to the repository. This instructs contributors on the usage of changesets. The changesets project recommends not making changesets mandatory (and neither the bot nor this PR makes those mandatory) since it's common for commits to be performed to monorepos that don't impact released packages (e.g. changing examples, docs or tooling).
Changesets allows us to manage the versioning of the packages in our
repository and can help us with releasing.
Additionally changeset files allow us to describe changes and their
impact on package versions to influence how versioning will happen and
keep track of a changelog.
The main router package and cli will always have the same version
(configured as fixed) even if only one of the two has changes
access has been set to public since we publish public packages
updateInternalDependencies has been set to minor which provides
package consumers a bit more room on what package versions they use
and does not strictly require the use of the latest patch version.
This was recommended by the documentation.
To complete setup we must add a GITHUB_TOKEN and NPM_TOKEN (without
2FA for publishing) to the GitHub repository secrets.
The workflow will create a pull request when new changesets are found on
the main branch. When this pull request is merged the versions of
packages will be updated and a new release on NPM will be created
automatically. When more changes are added to the main branch the pull
request will automatically be updated.
This makes it easier for contributors to test changes that were merged
in their own project by publishing nightly builds to NPM under the
experimental tag.
We run this nightly but only actually publish a new snapshot if there
have been commits in the last 24 hours.
The below commits set-up changesets for version management of our packages and the creation of a PR to help in automated publishing. Additionally it adds a workflow for nightly snapshot publishing (at 2 AM UTC) if there have been commits in the past 24 hours.
To complete set-up the following steps must be taken by the repository maintainer:
main
changesets
tool to publish to NPMSet-up changesets
Changesets allows us to manage the versioning of the packages in our repository and can help us with releasing.
Additionally changeset files allow us to describe changes and their impact on package versions to influence how versioning will happen and keep track of a changelog.
A few configuration changes have been made with respect to the default configuration. The docs for config can be found at https://github.com/changesets/changesets/blob/main/docs/config-file-options.md
access
has been set topublic
since we publish public packagesupdateInternalDependencies
has been set tominor
which provides package consumers a bit more room on what package versions they use and does not strictly require the use of the latest patch version. This was recommended by the documentation.Add automated publishing workflow
This adds a release workflow. The workflow is based on https://github.com/changesets/action#with-publishing
To complete setup we must add a
GITHUB_TOKEN
andNPM_TOKEN
(without 2FA for publishing) to the GitHub repository secrets.The workflow will create a pull request when new changesets are found on the main branch. When this pull request is merged the versions of packages will be updated and a new release on NPM will be created automatically. When more changes are added to the main branch the pull request will automatically be updated.
Add GitHub action to publish nightly snapshot releases
This makes it easier for contributors to test changes that were merged in their own project by publishing nightly builds to NPM under the
experimental
tag.We run this nightly but only actually publish a new snapshot if there have been commits in the last 24 hours.