Skip to content

Commit 0be12f0

Browse files
ci: fix check and update version
1 parent b336767 commit 0be12f0

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)