File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,13 +53,16 @@ jobs:
5353
5454 - name : Check and Update Version
5555 run : |
56- CURRENT_VERSION=$(node -p "require('./package.json').version")
57- if npm info react-native-linear-gradient-text@${CURRENT_VERSION} > /dev/null 2>&1; then
58- echo "Version ${CURRENT_VERSION} already published. Incrementing version..."
59- yarn version --patch --no-git-tag-version
60- else
61- echo "Version ${CURRENT_VERSION} is available."
62- fi
56+ CURRENT_VERSION=$(node -p "require('./package.json').version")
57+ echo "Current version in package.json: ${CURRENT_VERSION}"
58+
59+ while npm info react-native-linear-gradient-text@${CURRENT_VERSION} > /dev/null 2>&1; do
60+ echo "Version ${CURRENT_VERSION} already exists on NPM. Incrementing version..."
61+ yarn version --patch --no-git-tag-version
62+ CURRENT_VERSION=$(node -p "require('./package.json').version")
63+ done
64+
65+ echo "Version ${CURRENT_VERSION} is available. Ready for release."
6366
6467 - name : Release
6568 run : yarn release
You can’t perform that action at this time.
0 commit comments