Skip to content

Commit a878469

Browse files
committed
2 parents 9ae791d + c348b3e commit a878469

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/auto-publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,22 @@ jobs:
185185
186186
# Calculate new version
187187
NEW_VERSION=$(node -e "
188-
const semver = require('semver');
189188
const current = '$CURRENT_VERSION';
190-
console.log(semver.inc(current, '$VERSION_TYPE'));
189+
const type = '$VERSION_TYPE';
190+
const parts = current.split('.').map(Number);
191+
192+
if (type === 'major') {
193+
parts[0]++;
194+
parts[1] = 0;
195+
parts[2] = 0;
196+
} else if (type === 'minor') {
197+
parts[1]++;
198+
parts[2] = 0;
199+
} else {
200+
parts[2]++;
201+
}
202+
203+
console.log(parts.join('.'));
191204
")
192205
193206
echo "🚀 New version will be: $NEW_VERSION"

0 commit comments

Comments
 (0)