Skip to content

Add vcpkg-release-bump workflow and bump in-repo overlay port to v3.10.161.1#1475

Open
bmehta001 wants to merge 4 commits into
microsoft:mainfrom
bmehta001:bhamehta/vcpkg-release-bump-workflow
Open

Add vcpkg-release-bump workflow and bump in-repo overlay port to v3.10.161.1#1475
bmehta001 wants to merge 4 commits into
microsoft:mainfrom
bmehta001:bhamehta/vcpkg-release-bump-workflow

Conversation

@bmehta001

@bmehta001 bmehta001 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This PR bundles two vcpkg-port maintenance changes:

1. .github/workflows/vcpkg-release-bump.yml (new)

Automatically opens a version-bump PR against microsoft/vcpkg for the cpp-client-telemetry port whenever a new SDK release is cut.

When it runs

  • Automatically on a published, non-draft, non-prerelease GitHub Release whose tag is a version (vMAJOR.MINOR.PATCH.BUILD).
  • Manually via workflow_dispatch with a tag input (recovery / re-runs).
  • Never on ordinary pushes, and it opens no PR if the port already matches the release (no real version change) — so it only acts on an actual version bump.

What it does: resolves the tag/version, computes the source SHA512, branches off vcpkg master in the configured fork, updates ports/cpp-client-telemetry/{portfile.cmake (REF + SHA512), vcpkg.json (version)}, runs format-manifest + x-add-version, and opens a [cpp-client-telemetry] Update to <version> PR. The vcpkg team still reviews/merges it.

One-time setup required (repo settings):

  • Variable VCPKG_FORK_REPO → the vcpkg fork to push branches to (e.g. your-org/vcpkg).
  • Secret VCPKG_BUMP_TOKEN → a PAT (classic: repo+workflow, or fine-grained: Contents + Pull requests RW on the fork) able to push to the fork and open PRs on microsoft/vcpkg.

Until the port is merged into the registry (PR microsoft/vcpkg#52316), the workflow fails fast with a clear message that the port must exist first.

2. Bump the in-repo overlay port to the v3.10.161.1 tag

tools/ports/cpp-client-telemetry/portfile.cmake previously pointed at the pre-release commit 4485b820. Repointed REF → the published v3.10.161.1 tag (SHA512 updated) for exact parity with the official microsoft/vcpkg port. (The version was already 3.10.161.1 from the release-prep.)

On a published version release, open a PR to microsoft/vcpkg bumping the
cpp-client-telemetry port (REF -> tag, recomputed SHA512, version, then
x-add-version). Runs only on published, non-prerelease version tags
(vX.Y.Z.W) or manual dispatch, and opens no PR when the port already
matches the release. Requires repo variable VCPKG_FORK_REPO and secret
VCPKG_BUMP_TOKEN.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bmehta001 bmehta001 requested a review from a team as a code owner June 11, 2026 00:25
Repoint tools/ports/cpp-client-telemetry REF from the pre-release commit to
the published v3.10.161.1 tag (SHA512 updated) for exact parity with the
official microsoft/vcpkg port. Version was already 3.10.161.1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bmehta001 bmehta001 changed the title Add vcpkg-release-bump workflow to automate port version bumps Add vcpkg-release-bump workflow and bump in-repo overlay port to v3.10.161.1 Jun 11, 2026
@bmehta001 bmehta001 self-assigned this Jun 11, 2026
@bmehta001 bmehta001 requested a review from Copilot June 11, 2026 03:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds automation to keep the upstream microsoft/vcpkg port for cpp-client-telemetry in sync with SDK releases, and aligns the in-repo overlay port’s REF with the published v3.10.161.1 tag.

Changes:

  • Add a new GitHub Actions workflow to open/update a vcpkg port bump PR when a release is published (or via manual dispatch).
  • Update the in-repo overlay port (tools/ports/.../portfile.cmake) to use REF v3.10.161.1 and its corresponding SHA512.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tools/ports/cpp-client-telemetry/portfile.cmake Repoint overlay port source REF/SHA512 to the published v3.10.161.1 tag for parity with the released SDK.
.github/workflows/vcpkg-release-bump.yml New workflow that computes the release tarball SHA512, updates the vcpkg port files, runs vcpkg formatting/version DB update, and opens/refreshes a PR in microsoft/vcpkg.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

./vcpkg x-add-version "${PORT}" --overwrite-version
git add versions
git commit -m "[${PORT}] Update version database"
git push --force-with-lease origin "${BR}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — confirmed and fixed in 5c345c8. Since the job runs in a fresh checkout, an already-existing bump branch on the fork has no refs/remotes/origin/${BR} locally, so --force-with-lease had no lease ref and the rerun push would be rejected — defeating the "force-pushed branch refreshes it" path. Added before the push:

git fetch origin "+refs/heads/${BR}:refs/remotes/origin/${BR}" || true
git push --force-with-lease origin "${BR}"

The || true keeps the first run (branch doesn't exist remotely yet) working, and on reruns the remote-tracking ref now gives the lease something to compare against. Fixed.

bmehta001 and others added 2 commits June 11, 2026 11:24
…alls

building-with-vcpkg.md only told manifest-mode users to add
`cpp-client-telemetry` to vcpkg.json, which fails with an unknown-port
error until the port is accepted into the official vcpkg registry.
Document the `vcpkg-configuration.json` `overlay-ports` fallback that
points manifest mode at the in-repo overlay port, giving parity with the
classic-mode `--overlay-ports` instructions already in the doc.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
.github/workflows/vcpkg-release-bump.yml (Copilot): `git push
--force-with-lease` could fail on reruns because a fresh clone has no
remote-tracking ref for an already-existing bump branch, so the workflow
couldn't refresh an open bump PR (contradicting the "force-pushed branch
refreshes it" intent). Fetch the branch into refs/remotes/origin/${BR}
(|| true on the first run, when it doesn't exist yet) before the
force-with-lease push so the lease has a ref to compare against.
  Verified at .github/workflows/vcpkg-release-bump.yml:146-152.

docs/building-with-vcpkg.md: remove the manifest-mode overlay-ports note
added in 136e010, per maintainer request.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants