Uh oh!
There was an error while loading. Please reload this page.
[FSSDK-12919] Replace deprecated hub CLI with gh in release workflow - #467
Conversation
Agent GitHub releases were shipping with no binary assets because the release workflow attached generate_secret via the deprecated `hub` CLI, which is not installed on GitHub-hosted runners (hub: command not found). Replace `hub` with `gh` (preinstalled on all runners): - ci_attach_generate_secret.sh: `hub release edit -a` -> `gh release upload --clobber` - new ci_create_github_release.sh: gh-based, idempotent replacement for travisci-tools/release_github_v2.sh (same CHANGELOG parsing) - workflow: drop install_hub.sh steps + unused travisci-tools checkouts; `hub release download -i` -> `gh release download -p` https://optimizely-ext.atlassian.net/browse/FSSDK-12919 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pvcraven
left a comment
There was a problem hiding this comment.
Kimi feedback. Thoughts?
Suggestions (non-blocking)
scripts/ci_create_github_release.sh- Add
set -e(orset -euo pipefail) alongsideset -o pipefail. Right now a failinggrep/awkwon’t stop the script. - Quote
${CHANGELOG}and consider an explicit[[ -f "${CHANGELOG}" ]]check before parsing. - Consider writing the extracted notes to a temp file and using
gh release create ... --notes-file <file>instead of--notes "${DESCRIPTION}". SinceDESCRIPTIONis a changelog body, double-quoting it means backticks and$will be shell-expanded/parsed, which is risky for release notes.
- Add
.github/workflows/agent.yml- The
HOME: 'home/runner'env override is now unused in thecreate and upload packagesandrun scriptsteps. Removing it would avoid confusion about why$HOMEis being overridden. - On the Windows verification runner the step uses
shell: bash, which is fine becauseghis preinstalled and Git Bash providestar.
- The
Question
- The new create script only creates a release when
gh release viewsays it doesn’t exist, and it creates it as--draft. If a tag is pushed directly (not from the GitHub UI), the release will be created as a draft and assets will attach, but it will remain unpublished until someone manually publishes it. Is that the intended behavior? It matches the old wording, but worth confirming.
- ci_create_github_release.sh: set -eo pipefail; guard missing CHANGELOG.md; quote CHANGELOG; write notes to a temp file and use --notes-file so backticks/$ in the changelog body aren't shell-parsed - agent.yml: remove now-unused HOME='home/runner' override Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mat001
commented
Jul 16, 2026
Thanks @pvcraven — addressed all the suggestions in c955a67.
Question — draft behavior |
pvcraven
left a comment
There was a problem hiding this comment.
Thanks for addressing my earlier comments. This looks good to me.
Uh oh!
There was an error while loading. Please reload this page.
Problem
Agent GitHub releases ship with no binary assets (v4.4.0 and v4.5.0 both have 0 assets). The release workflow attaches the
generate_secretbinary using the deprecatedhubCLI, which is not installed on GitHub-hosted runners →hub: command not found(exit 127). DockerHub image pushes succeed, but the release-asset step fails and turns thebuild_upload_publish_draftjob red.Fix
Replace
hubwithgh, which is preinstalled on all GitHub-hosted runners:scripts/ci_attach_generate_secret.sh:hub release edit -a→gh release upload --clobber(keeps per-asset display labels viagh'spath#labelsyntax).scripts/ci_create_github_release.sh(new): agh-based, idempotent replacement fortravisci-tools/release_github/release_github_v2.sh. Same CHANGELOG.md parsing for release notes; usesgh release create --draft..github/workflows/agent.yml:install_hub.shsteps and their now-unusedoptimizely/travisci-toolscheckouts.hub release download -i→gh release download -pin the asset-verification job.Two robustness fixes beyond a literal swap
gh release createwould fail just likehubdid. The new script checksgh release viewfirst and skips creation, letting the upload proceed.$APP_VERSION(nov) to the create script but$RELEASE_TAG(v4.5.0) to the attach script. Both now use$RELEASE_TAG, matching the actualv-prefixed tag format.Verification
ghCLI thatrelease uploadsupports#label,release downloadsupports-p, and both support--clobber.hub/install_hub/release_github_v2/travisci-toolsreferences remain in the release jobs.release_github_v2.shis self-contained (no other sourced files), so nothing else is lost by dropping the travisci-tools dependency in the release path. (integration_test.ymlstill uses travisci-tools for its trigger script — intentionally untouched.)The only true end-to-end test is the next tagged release.
https://optimizely-ext.atlassian.net/browse/FSSDK-12919
🤖 Generated with Claude Code