The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(release): make Create Release reliable for stable maintenance cuts (#31986)
yuneng-jiangb38c2906c32c
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.ymlindex 4834775e329..0ad84cd3ceb 100644--- a/.github/workflows/create-release.yml+++ b/.github/workflows/create-release.yml@@ -122,10 +122,28 @@ jobs:makeLatest = (!latestVersion || isAtLeast(newVersion, latestVersion)) ? "true" : "false";}+ try {+ await github.rest.git.createRef({+ owner: context.repo.owner,+ repo: context.repo.repo,+ ref: `refs/tags/${tag}`,+ sha: commitHash,+ });+ } catch (error) {+ if (error.status !== 422) throw error;+ const existing = await github.rest.git.getRef({+ owner: context.repo.owner,+ repo: context.repo.repo,+ ref: `tags/${tag}`,+ });+ if (existing.data.object.sha !== commitHash) {+ throw new Error(`Tag ${tag} already exists at ${existing.data.object.sha}, expected ${commitHash}`);+ }+ }+const response = await github.rest.repos.createRelease({draft: true,generate_release_notes: true,- target_commitish: commitHash,name: tag,owner: context.repo.owner,prerelease: isPrerelease,@@ -138,11 +156,21 @@ jobs:owner: context.repo.owner,repo: context.repo.repo,release_id: response.data.id,+ tag_name: tag,body: updatedBody,draft: false,- make_latest: makeLatest,});+ if (!isPrerelease) {+ await github.rest.repos.updateRelease({+ owner: context.repo.owner,+ repo: context.repo.repo,+ release_id: response.data.id,+ tag_name: tag,+ make_latest: makeLatest,+ });+ }+} catch (error) {core.setFailed(error.message);}