published helps streamline a git based workflow with package publishing through continues delivery. Developers control their branch and version strategies, and published takes care of logical conditioning of when to publish stable versions and/or release candidates.
Run using npx
npx published --testing
Notify on Slack
npx published --slack.webhook $SLACK_WEBHOOK
Change Slack webhook channel
npx published --slack.webhook $SLACK_WEBHOOK --slack.channel "#publish"
Silent outputs and notifications
npx published --quiet
Push a tag to git, Only from master(latest-branch) or latest branch
npx published --git-tag
Execute shell command after a publish event
npx published --on-publish bash\ ./do-more.sh
Execute shell command after a publish event with this tag (executes after on-publish)
npx published --on-latest 'echo "Published!"'
Branch that is considered latest (default is 'master')
npx published --latest-branch stable
Tag name to be used regardless of config. If performed from a branch other than master, needs to be used in conjunction with latest-branch option
npx published --tag-name next --latest-branch next
Release RC versions on tag by branch name.
Master (latest) branch
Release clean semver on "latest" tag.
In order to publish an NPM package as a privileged user, create an NPM configuration file. One way to do it is to hide the token in an environment variable and add this preceding step: