Skip to content

Commit

Permalink
BetaMode Instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmgdr committed Oct 26, 2023
1 parent e37bd27 commit 5834b77
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
31 changes: 11 additions & 20 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,30 @@ finally `changeset publish` will go thru and publish to npm the packages that ne

after go ahead and run `git push --follow-tags` to push git tags up to github.

## for pre releasing
## For pre releasing

changesets has 2 strategies for pre release versions.
For Detailed Steps read scripts/beta-mode.sh

The first is to enter `pre` mode on changesets. [docs here](https://github.com/changesets/changesets/blob/main/docs/prereleases.md)
1. Run `yarn beta-enter`
This will enter into the pre mode of changesets and create a prerelease/beta branch and push it up to origin(github)

```
yarn changeset pre enter beta
yarn changeset version
git add .
git commit -m "Enter prerelease mode and version packages"
yarn changeset publish
git push --follow-tags
```
Any time a commit is pushed to prerelease/** github will go and open a specially Version Packages (Beta) PR. You can merge this and packages will be published as specified in the branch (should be beta)

The other is to append --snapshot. which is great for daily releases.
2. If you need to release another beta make a changeset and commit it up.

```
yarn changeset version --snapshot canary
yarn changeset publish --no-git-tag --snapshot
```
<https://github.com/changesets/changesets/blob/main/docs/snapshot-releases.md>
3. When done run `yarn beta-exit`
This will exit changeset pre mode. Push up.

4. Now you can Open a Pr with your prerelease/? branch against main.

## Package Versioning

Based on semantic versioning best practices [semver.org](semver.org)

Given a version number MAJOR.MINOR.PATCH, increment the:

- MAJOR version when you make incompatible API changes
- MINOR version when you add functionality in a backward compatible manner
- PATCH version when you make backward compatible bug fixes

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
21 changes: 21 additions & 0 deletions scripts/beta-mode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# Beta Workflow steps

# 1. create a prerelease/random branch
git branch prerelease/$BETA_BRANCH
# 2. check it out
git checkout prerelease/$BETA_BRANCH
# 3. enter pre mode (beta)
yarn cs pre enter beta
# 4. commit
git add .changeset/pre.json
git commit -m "enter beta mode"
# 5. push
git push origin prerelease/$BETA_BRANCH
# 6. githhub action will automatically trigger and open a Version packages (beta) PR against the prerelease/random branch
# 7. merge that PR to publish or Push up more commits to update
# a. if you do merge/publish you will need to add more changesets to initiate a new beta being published
# 8. repeat 7 if wanted
# 9. when ready to exit pre mode. `yarn beta-exit`
# 11. open PR for prerelease into main

0 comments on commit 5834b77

Please sign in to comment.