ci(hermes): tag hermes-v<version> on merge to main (PF-3818) - #39
Draft
Zechereh wants to merge 1 commit into
Draft
ci(hermes): tag hermes-v<version> on merge to main (PF-3818)#39Zechereh wants to merge 1 commit into
Zechereh wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MuBZaWAagoiTbcZzzCcq5K
|
Warning Review limit reachedNext included review available in 42 minutes. View limit detailsLimit details: You’ve used all 3 included reviews currently available. Your 47 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (1)
Comment |
londondavila
reviewed
Sep 2, 2026
| --- | ||
| name: Hermes CD - Tag release | ||
|
|
||
| # Renovate reads these tags to bump the ux-labs plugin pin. |
Contributor
There was a problem hiding this comment.
remove ref to repo name?
londondavila
reviewed
Sep 2, 2026
Comment on lines
+33
to
+43
| set -euo pipefail | ||
| version=$(sed -n 's/^version = "\(.*\)"$/\1/p' hermes/pyproject.toml | head -1) | ||
| [ -n "$version" ] || { echo "::error file=hermes/pyproject.toml::no version found"; exit 1; } | ||
| tag="hermes-v${version}" | ||
| if gh api "repos/${GITHUB_REPOSITORY}/git/ref/tags/${tag}" >/dev/null 2>&1; then | ||
| echo "${tag} already exists; nothing to do" | ||
| exit 0 | ||
| fi | ||
| gh api --method POST "repos/${GITHUB_REPOSITORY}/git/refs" \ | ||
| -f "ref=refs/tags/${tag}" -f "sha=${GITHUB_SHA}" | ||
| echo "tagged ${tag} at ${GITHUB_SHA}" |
Contributor
There was a problem hiding this comment.
this looks very fragile
Zechereh
marked this pull request as draft
September 3, 2026 00:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the tag that ux-labs Renovate reads to bump the Hermes plugin pin. PF-3818.
On a push to
maintouchinghermes/, reads the version fromhermes/pyproject.tomland createshermes-v<version>unless it already exists. Shape mirrorslangchain-publish.yml: check whether the version already shipped, then act.gh apirather thangit push, so no push credentials are needed. Tags created withGITHUB_TOKENdo not trigger other workflows, which is fine: Renovate polls the API and does not depend on a workflow event.Tags are prefixed
hermes-because this is a monorepo. Renovate strips the prefix withextractVersionTemplate, so siblinglangchain-v*andgoogle-adk-v*tags are ignored.Two things to do after merge
496cd63fefd982bbaa8a85ce78ef2270d700984f. With no tag at that commit Renovate finds nothing or proposes an immediate jump. Create the baseline once by hand:hermes-v0.1.1to appear from this PR's own merge, not from the version bump PR. The paths filter includes this workflow file, so merging this PR is itself a qualifying push. The tag therefore points at this merge commit rather than the bump commit. Harmless for Renovate.Verification
yamllintclean. Script traced by hand for the failure modes:sedwith no match exits 0 with empty output and is caught by the[ -n "$version" ]guard rather than passing silently; theif gh apiexistence check is exempt fromset -eso a 404 falls through to the POST as intended.Touches no
hermes/file, so theversion-bumpedgate from the companion PR correctly short-circuits to success.