File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ cli:npm:publish:
157157
158158 cd cli
159159
160- PKG_VERSION="$(node -p "require('./package.json').version")"
161160 TAG_VERSION="$RAW_TAG"
162161 TAG_VERSION="${TAG_VERSION#v}"
163162
@@ -173,15 +172,12 @@ cli:npm:publish:
173172 exit 1
174173 fi
175174
176- if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
177- echo "Version mismatch: cli/package.json=$PKG_VERSION but tag=$TAG_VERSION"
178- exit 1
179- fi
180-
181175 # Configure npm auth without committing credentials
182176 printf "//registry.npmjs.org/:_authToken=%s\n" "$NPM_TOKEN" > ~/.npmrc
183177
184178 npm ci --no-audit --no-fund
179+ # Make the git tag the source of truth without committing version bumps.
180+ npm version --no-git-tag-version "$TAG_VERSION"
185181 npm run build
186182 npm publish --tag "$DIST_TAG" --access public
187183 after_script :
You can’t perform that action at this time.
0 commit comments