Files
cline/.github
Dominic Cooney 8ffbd9983b ci(nightly): tag and push vscode-nightly-v<version> for each nightly build
Both nightly publish workflows (publish-nightly.yml and publish-nightly-sdk.yml)
publish to the saoudrizwan.cline-nightly extension with version
'${major}.${minor}.${unix-timestamp}'. Until now nothing on the git side
recorded which commit a given marketplace version was built from, which
made post-hoc 'what's in version X.Y.<timestamp>?' triage essentially
require reverse-engineering the GitHub Actions run history.

Follow the technique from publish.yml (the stable release workflow): after
a successful publish, configure a github-actions[bot] git identity, create
an annotated tag pointing at the build SHA, and push it to origin.

Changes:

- scripts/publish-nightly.mjs: when running under GitHub Actions (i.e.
  GITHUB_OUTPUT is set), append 'version=${newVersion}' to that file so
  the calling workflow can read steps.publish.outputs.version. The
  generated version is computed in exactly one place (Math.floor(
  Date.now()/1000)), eliminating drift risk between the published vsix
  and the tag.

- publish-nightly.yml: give the publish step id 'publish'; add a
  'Tag and push nightly build' step that creates and pushes
  vscode-nightly-v${VERSION}. The workflow already has 'contents: write'
  permissions and a credentialled checkout, so 'git push origin' just works.

- publish-nightly-sdk.yml: bump 'contents: read' -> 'contents: write';
  add the same tagging step, but push using an explicit
  https://x-access-token:${GITHUB_TOKEN}@github.com/... URL rather than
  relying on a persisted credential. This lets us keep
  'persist-credentials: false' on the SDK source checkout (defense in
  depth: that token cannot inadvertently push to
  dpc/sdk-migration-simpler-login). Tag refs (refs/tags/*) are the only
  thing this token gets used to push.

Tag namespace 'vscode-nightly-v...' is intentionally distinct from the
'vX.Y.Z' tags used for stable VS Code releases, and reserves room for
future 'jetbrains-nightly-v...' / 'cli-nightly-v...' tag families.
Existing stable 'vX.Y.Z' tags are left untouched.
2026-05-07 18:24:33 +09:00
..