Skip to content

Commit

Permalink
Merge pull request #966 from brendandburns/examples
Browse files Browse the repository at this point in the history
Fix push script to be able to run without input and skip tagging.
  • Loading branch information
k8s-ci-robot authored Jan 21, 2023
2 parents 22e0b76 + f2a0219 commit e05b37c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ jobs:
run: ./push-package.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
confirm: "y"
SKIP_TAG: "y"
10 changes: 7 additions & 3 deletions push-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ version=$(cat package.json | jq -r .version)
. ./pre-check.sh

echo "This will tag and publish package version ${version}"
read -p "Confirm [y/N]" confirm
if [[ -z "$confirm" ]]; then
read -p "Confirm [y/N]" confirm
fi

case "${confirm}" in
y|Y ) echo "Tagging and pushing ${version}";;
* ) echo "Aborting"; exit 0;;
esac

git tag ${version}
git push upstream ${version}
if [[ -z "$SKIP_TAG" ]]; then
git tag ${version}
git push upstream ${version}
fi

npm publish
npm version patch -m "Update to version ${version}"

0 comments on commit e05b37c

Please sign in to comment.