Skip to content

Instantly share code, notes, and snippets.

@Jaid
Created July 4, 2019 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jaid/e9d9c5c6f978a5c2ca673f247cdec6cb to your computer and use it in GitHub Desktop.
Save Jaid/e9d9c5c6f978a5c2ca673f247cdec6cb to your computer and use it in GitHub Desktop.
npm package release script
#!/usr/bin/env bash
set -e
set -o errexit
weight=${1:-patch}
npm run clean
npm test
npx version-bump-prompt $weight
git add .
git commit -am "Bumped package version ($weight)"
git push
version=$(npx project-version)
git tag v$version
git push --tags
npx open-cli https://github.com/Jaid/$(basename $PWD)/releases/new?tag=v$version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment