Skip to content

Conversation

@yuhanasy
Copy link
Collaborator

We add this into scripts

"scripts": {
    "build": "preconstruct build",
    "preversion": "git stash; git checkout master; git pull origin master",
    "postversion": "yarn release",
    "postpublish": "git push origin --all; git push origin --tags",
    "release": "yarn build && yarn publish",
    "format": "prettier --write ./**/*"
  },

So, to publish new version into npm registry we only need to run this on our local repos,

  • yarn version or,
  • yarn version --major or,
  • yarn version --minor or,
  • yarn version --major

Then it will automate update version in package.json, and update tag in git, publish to npm registry, and push into github. Hope so 🙏🏻

@yuhanasy yuhanasy requested a review from nasrul21 July 28, 2020 08:07
@yuhanasy
Copy link
Collaborator Author

sequence of the command that will be executed when running yarn version, it would be:

  1. preversion
  2. version
  3. postversion
  4. release
  5. build
  6. publish
  7. postpublish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant