From 81b611507ead6d056da032bfc37c441bc741561f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Schmitz?= Date: Wed, 12 May 2021 15:42:02 -0300 Subject: [PATCH] docs: add tutorial to publish canary versions --- .github/CONTRIBUTING.md | 19 +++++++++++++++++++ package.json | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ccd295d..062cabb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -66,5 +66,24 @@ When opening a pull request, please be sure to update any relevant documentation This repository uses [changesets][] to do versioning. What that means for contributors is that you need to add a changeset by running `yarn changeset` which contains what packages should be bumped, their associated semver bump types, and some markdown which will be inserted into changelogs. +### Publish canary version + +To publish a canary version using `changesets`, you'll need to be in the GraphCMS npm organization. Otherwise, ask a maintainer to do it for you. To get started, enter prerelease mode. You can do that with the `pre enter `. The tag that you need to pass is used in versions(e.g. `1.0.0-canary.0`) and the npm dist tag. + +A prerelease workflow might look something like this: + +```sh +yarn changeset pre enter canary +yarn changeset +yarn changeset version +yarn build +git add . +git commit -m "chore(release): v1.0.0-canary.0" +yarn changeset publish +git push --follow-tags +``` + +For more information, [check this link](https://github.com/atlassian/changesets/blob/main/docs/prereleases.md). + [yarn workspaces]: https://yarnpkg.com/en/docs/workspaces [changesets]: https://github.com/atlassian/changesets diff --git a/package.json b/package.json index c1b80a3..7d9c096 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,6 @@ "start:app": "yarn run build && yarn --cwd example && yarn --cwd example start", "changeset": "changeset", "release": "changeset publish", - "version:canary": "changeset version --snapshot canary", - "release:canary": "changeset publish --tag canary", "size": "size-limit", "analyze": "size-limit --why", "prepare": "husky install"