This repository has been archived by the owner on Oct 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Release workflow
Kimi Gao edited this page Sep 11, 2018
·
3 revisions
- 1. Upgrade Version
- 2. Check CHANGELOG.md
- 3. Push tags to remote repository
- 4. Publish package
- 5. Edit release note in github
Suppose the last version of your code is 1.0.0
npm run release -- --release-as minor # major, minor, patch
# Or
npm run release -- --release-as 1.1.0
Use the flag --prerelease
to generate pre-releases
Such as 1.0.1-alpha.0
, 1.0.1-beta.0
, 1.0.1-rc.0
npm run release -- --prerelease alpha # alpha, beta, rc
NOTE: you can combine
--release-as
and--prerelease
to generate a release. This is useful when publishing experimental feature(s).
NOTE: If you have your GPG key set up, add the
--sign
or-s
flag to your command.
See more:
If you need to adjust changelog, you should run those commands after adjusted:
git reset HEAD~
git add .
git cz
# choose chore -> release -> x.x.x
git push origin --tags
# If you have changed CHANGELOG.md, you should follow those commands at first
git tag -d vx.x.x # delete local latest tag
git push origin --delete tag vx.x.x # delete remote latest tag
git tag -a vx.x.x -m 'chore(release): x.x.x' # patch latest tag
git push origin --tags
npm login
npm publish
Copy the changelog of the latest version, then paste on repo releases page: