Skip to content

Instantly share code, notes, and snippets.

@alirezabonab
Created January 3, 2021 20:28
Show Gist options
  • Save alirezabonab/3c37b342b7ca4dbe5f1f6d40f248fffa to your computer and use it in GitHub Desktop.
Save alirezabonab/3c37b342b7ca4dbe5f1f6d40f248fffa to your computer and use it in GitHub Desktop.
release:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Add github.com to known hosts
command: mkdir ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
- run:
name: Versioning
command: npm version patch -m "version %s [skip ci]"
- run:
name: Push tag & changes to github.com
command: git push
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run:
name: Publish the package
command: npm publish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment