-
Notifications
You must be signed in to change notification settings - Fork 0
Publish versions
- Apply the Changesets
- Commit all the changes
- Create/Update the release branches
- (Optional) Deleting unsupported old releases
- Push all the branches
- (Optional) Creating a git tag
- (Optional) Creating a GitHub release
- (First version only) Enabling GitHub Pages
- (Optional) Publish the new version on npm
pnpm run changeset:version
- Add all the changes:
git add .
. - Commit all the changes:
git commit
.
The release branch should not exist. If it does, remove it before continuing.
Run git branch releases/MAJOR master
where MAJOR
is the new major
version.
The release branch should already exist. If not, follow the subsection above.
Run git fetch . master:releases/MAJOR
where MAJOR
is the current major
version.
It is recommended to support the last two or three major versions, this means that bug fixes and security updates can be backported via release branches.
If you do not plan to support a previous release, you must delete its branch. This will cause the related documentation to be pruned on the next CI run.
- Remove the branch locally:
git branch -d releases/OLD_MAJOR
, whereOLD_MAJOR
is the unsupported major version. - Remove the branch on the remote:
git push --delete releases/OLD_MAJOR
.
git push origin --all --set-upstream
Note: This will run the CI to update the documentation. Please wait until the CI is passing before continuing.
- Run
git tag -a v1.2.3
where1.2.3
is the version inpackage.json
- Push the tag:
git push origin --tags
.
- Open the repository.
- Press on “Releases”. If it is not visible, press on “tags” and then select “Releases”.
- Press on “Create / Draft a new release”.
- Enter the tag version
v1.2.3
where1.2.3
is the version inpackage.json
. - Copy the tag version into the release title.
- Copy the correct section of the
CHANGELOG.md
into the description. - Press on “Publish release”.
Note: In this section, 1.2.3
is the version in package.json
.
Extract the correct section from the CHANGELOG.md
into CHANGELOG-v1.2.3.md
and then run the following command:
gh release create v1.2.3 \
--title v1.2.3 \
--notes-file CHANGELOG-v1.2.3.md
Following the command, the file CHANGELOG-v1.2.3.md
is no longer needed and
can be deleted.
GitHub Pages host the documentation files. However, The documentation CI only
creates the gh-pages
branch once there is at least one release branch.
- Open the repository
- Press on “Settings”.
- In the sidebar, press on “Pages”.
- Select
gh-pages
from the first drop down. - Select
/ (root)
from the second drop down. - Press on “Save”.
Note: This API currently is a preview, and might change in the future.
Run the following command, where USER/REPO
is the name of the repository.
This might require a personal access token.
curl \
-X POST \
-H 'Accept: application/vnd.github.switcheroo-preview+json' \
repos/USER/REPO/pages \
-d '{"source":{"branch":"gh-pages","path":"/"}}'
This can not be undone easily, double check if everything is correct.
pnpm publish