Append --tags --force flags to the git fetch upstream command so that
upstream tag references are always updated and locally diverged tags
are overwritten to match the remote state.
Keep the original order (push before publish) to preserve the safe
failure mode, but replace the cherry-pick with rebase and add a
3-attempt retry loop to shrink the race window.
Move the git push operation to the end of the publishing process to minimize race conditions. Replace the cherry-pick logic with a rebase onto origin/main and a retry loop to ensure the release commit is pushed successfully even if concurrent merges occur.
@changesets/changelog-github renders GitHub App credits with the app slug (e.g. [@kilo-code-bot](https://github.com/apps/kilo-code-bot)), not the '[bot]'-suffixed commit author login. v7.2.12 leaked a 'Thanks @kilo-code-bot!' line because the team set only contained 'kilo-code-bot[bot]'. Add the bare slug.
The SDK build step imported earlier in publish.ts does process.chdir into
packages/sdk/js and never restores it, so the relative path to
packages/kilo-vscode/CHANGELOG.md later in the release block resolved to a
missing file. The read silently fell through to an empty string and the
GitHub release body ended up as the 'No notable changes' default even
though the CHANGELOG in the release commit had all the entries.
Resolve the path relative to this script via fileURLToPath so it works
regardless of cwd.
The version job ran `bunx changeset version` to consume .changeset/*.md
files and update CHANGELOG.md, but the publish job (which commits and
pushes) ran on a separate runner with a fresh checkout — discarding all
changelog changes. This caused CHANGELOG.md to stay stuck at 7.2.1
despite 9 subsequent releases.
Move changeset consumption into publish.ts so it runs on the same runner
that commits. Extract release notes from the updated changelog and pass
them to `gh release edit` so GitHub releases also get correct notes.