Skip to content

Commit 0ced2b0

Browse files
committed
fix: retain version major bump
1 parent 2098ef9 commit 0ced2b0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ jobs:
5151

5252
- run: |
5353
version=$(jq -r '.info.version' ./openapi.json)
54+
version=$(node -p "
55+
const semver = require('semver');
56+
57+
const version = semver.parse('$version');
58+
version.major += 1;
59+
60+
version.format()
61+
")
62+
5463
version_tag=$(node -p "require('semver').parse('$version')?.prerelease[0] || 'latest'")
5564
5665
echo "version=$version" >> $GITHUB_ENV
@@ -61,4 +70,4 @@ jobs:
6170
- run: pnpm build
6271

6372
- if: github.ref == 'refs/heads/main'
64-
run: npm publish --no-git-checks --tag ${{ env.version_tag }}
73+
run: pnpm publish --no-git-checks --tag ${{ env.version_tag }}

0 commit comments

Comments
 (0)