We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9ae791d + c348b3e commit a878469Copy full SHA for a878469
.github/workflows/auto-publish.yml
@@ -185,9 +185,22 @@ jobs:
185
186
# Calculate new version
187
NEW_VERSION=$(node -e "
188
- const semver = require('semver');
189
const current = '$CURRENT_VERSION';
190
- console.log(semver.inc(current, '$VERSION_TYPE'));
+ const type = '$VERSION_TYPE';
+ 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
199
+ } else {
200
+ parts[2]++;
201
+ }
202
203
+ console.log(parts.join('.'));
204
")
205
206
echo "🚀 New version will be: $NEW_VERSION"
0 commit comments