Skip to content

ci(hermes): tag hermes-v<version> on merge to main (PF-3818) - #39

Draft
Zechereh wants to merge 1 commit into
mainfrom
zach/pf-3818-hermes-release-tag
Draft

ci(hermes): tag hermes-v<version> on merge to main (PF-3818)#39
Zechereh wants to merge 1 commit into
mainfrom
zach/pf-3818-hermes-release-tag

Conversation

@Zechereh

@Zechereh Zechereh commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Adds the tag that ux-labs Renovate reads to bump the Hermes plugin pin. PF-3818.

On a push to main touching hermes/, reads the version from hermes/pyproject.toml and creates hermes-v<version> unless it already exists. Shape mirrors langchain-publish.yml: check whether the version already shipped, then act.

gh api rather than git push, so no push credentials are needed. Tags created with GITHUB_TOKEN do 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 with extractVersionTemplate, so sibling langchain-v* and google-adk-v* tags are ignored.

Two things to do after merge

  1. Retro-tag the currently pinned SHA. ux-labs pins 496cd63fefd982bbaa8a85ce78ef2270d700984f. With no tag at that commit Renovate finds nothing or proposes an immediate jump. Create the baseline once by hand:
    gh api --method POST repos/tinyfish-io/tinyfish-web-agent-integrations/git/refs \
      -f "ref=refs/tags/hermes-v0.1.0" \
      -f "sha=496cd63fefd982bbaa8a85ce78ef2270d700984f"
    
  2. Expect hermes-v0.1.1 to 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

yamllint clean. Script traced by hand for the failure modes: sed with no match exits 0 with empty output and is caught by the [ -n "$version" ] guard rather than passing silently; the if gh api existence check is exempt from set -e so a 404 falls through to the POST as intended.

Touches no hermes/ file, so the version-bumped gate from the companion PR correctly short-circuits to success.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuBZaWAagoiTbcZzzCcq5K
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit 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.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 5afbd0e4-49ce-417f-be9b-b1d7fac887c3

📥 Commits

Reviewing files that changed from the base of the PR and between 496cd63 and cd3cbc7.

📒 Files selected for processing (1)
  • .github/workflows/hermes-release.yml

Comment @coderabbitai help to get the list of available commands.

---
name: Hermes CD - Tag release

# Renovate reads these tags to bump the ux-labs plugin pin.

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.

remove ref to repo name?

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}"

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.

this looks very fragile

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