From eceee2a264449b771617100f48e54f37baae5cda Mon Sep 17 00:00:00 2001 From: Ice Lam Date: Wed, 5 May 2021 18:49:52 +0800 Subject: [PATCH] docs: document publish procedures --- docs/publish.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docs/publish.md diff --git a/docs/publish.md b/docs/publish.md new file mode 100644 index 0000000..7006cfe --- /dev/null +++ b/docs/publish.md @@ -0,0 +1,60 @@ +# Publish procedure + +## Version 1 +For publishing v1 of the plugin which supports webpack 4, checkout `v1` branch, and run the following commands: +```bash +# checkout branch +git checkout v1 + +# pull the latest code +git pull + +# make sure dependencies are in correct version +yarn + +# bump package version +yarn release + +# create build +yarn build + +# publish to npm (OTP needed) +npm publish + +# push code and trigger github release creation +git push +``` + +## Version 2 +For publishing v2 of the plugin which supports webpack 5, checkout `develop` branch, and run the following commands: +```bash +# checkout branch +git checkout develop + +# pull the latest code +git pull + +# switch to master branch +git checkout master + +# pull the latest code from master +git pull + +# merge code from develop branch +git merge --no-ff develop + +# make sure dependencies are in correct version +yarn + +# bump package version +yarn release + +# create build +yarn build + +# publish to npm (OTP needed) +npm publish + +# push code and trigger github release creation +git push +```