Skip to content

Commit 6ba7331

Browse files
committed
docs: explain how to publish pre-releases
1 parent 6d122ff commit 6ba7331

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ Both must be deployed to see them in action.
103103

104104
Although the project is a monorepo, the release policy is per package (each version number is independent of the others).
105105

106+
> Warning: see the next section if you want to publish a pre-release version.
107+
106108
To release a new version use `yarn version`
107109

108110
```sh
@@ -143,6 +145,26 @@ After the release, you can confirm that the packages are correctly listed in the
143145
- https://www.npmjs.com/package/liferay-js-toolkit-core
144146
- https://www.npmjs.com/package/liferay-npm-bundler
145147

148+
## Releasing pre-release versions
149+
150+
Because this branch is still in development phase we need to publish pre-release versions until we get to the final publication. For this reason, the above process needs to be tweaked a bit.
151+
152+
The original steps up to `yarn version` remain the same, but then you must run:
153+
154+
```sh
155+
$ yarn version --new-version 3.0.0-alpha.3
156+
```
157+
158+
This will create the release commit and the tag but refuse to push it or run `yarn publish` because we are not in `master` branch. The way to go is to continue manually:
159+
160+
```sh
161+
$ git push upstream 3.x-WIP --follow-tags
162+
163+
# When asked for the new version number just hit ENTER
164+
# If asked for an OTP token, just type the six digits and ENTER
165+
$ yarn publish --tag pre
166+
```
167+
146168
## Releasing local-only versions
147169

148170
If you need to test local versions of the packages, you can install [Verdaccio](https://verdaccio.org) (a local NPM repository). Verdaccio is usually located at `http://localhost:4873` and you can use these commands to work with it:

0 commit comments

Comments
 (0)