{"record":{"id":"423ec04d8e35c294","repo":"midudev/autoskills","slug":"no-se-pudo-crear-la-release-en-github-tienes-gh-instalado-y","errorCode":null,"errorMessage":"⚠️  No se pudo crear la release en GitHub (¿tienes gh instalado y autenticado?)","messagePattern":"⚠️  No se pudo crear la release en GitHub \\(¿tienes gh instalado y autenticado\\?\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/autoskills/scripts/release.mjs","lineNumber":403,"sourceCode":"  rollbackRelease();\n  const message = error instanceof Error ? error.message : String(error);\n  fail(`La release falló y se revirtieron los cambios locales.\\n${message}`);\n}\n\n// 11. Create GitHub release\nconsole.log(\"\\n🏷️  Creando GitHub Release...\");\nconst releaseNotes = changelogEntry.replace(/^## .*\\n\\n/, \"\");\nconst tempFile = resolve(ROOT, \".release-notes-tmp.md\");\nwriteFileSync(tempFile, releaseNotes);\n\ntry {\n  run(\n    `gh release create v${newVersion} --title \"v${newVersion}\" --notes-file .release-notes-tmp.md`,\n    { cwd: ROOT },\n  );\n  console.log(`✅ Release v${newVersion} creada en GitHub`);\n} catch {\n  console.warn(`⚠️  No se pudo crear la release en GitHub (¿tienes gh instalado y autenticado?)`);\n  console.warn(`   Puedes crearla manualmente: ${repoUrl}/releases/new?tag=v${newVersion}`);\n} finally {\n  try {\n    run(`rm .release-notes-tmp.md`);\n  } catch {}\n}\n\nconsole.log(`\\n🎉 ¡Release v${newVersion} completada!\\n`);\n","sourceCodeStart":385,"sourceCodeEnd":412,"githubUrl":"https://github.com/midudev/autoskills/blob/0ec725320d2137253ab2e68e7ba8a072148e741a/packages/autoskills/scripts/release.mjs#L385-L412","documentation":"After pushing, release.mjs creates a GitHub Release via the `gh` CLI (`gh release create v<newVersion> --notes-file .release-notes-tmp.md`). If that command fails, the script catches the error, warns that the GitHub release could not be created, and prints a manual URL. Common root causes: `gh` not installed, not authenticated, network failure, or the tag/release already existing.","triggerScenarios":"The `gh release create v<newVersion>` command exits non-zero — gh CLI missing from PATH, `gh auth` never run (no token), expired/insufficient-scoped token, tag v<newVersion> already has a release, or no network access.","commonSituations":"Fresh CI machine or local env without gh; token expired after a GitHub security sweep; re-running a release after a partial failure so the release already exists; corporate proxy blocking api.github.com.","solutions":["Install and authenticate the GitHub CLI: `gh auth login`, then re-create the release: `gh release create v<newVersion> --notes-file .release-notes-tmp.md`.","Open the manual URL printed right after the warning (`<repoUrl>/releases/new?tag=v<newVersion>`) and create the release in the browser.","If the release already exists, check `gh release view v<newVersion>` — you may only need `gh release edit` to update notes."],"exampleFix":"// before\n$ gh release create v1.2.0 --notes-file .release-notes-tmp.md\ngh: To get started with GitHub CLI, please run: gh auth login\n// after\n$ gh auth login\n$ gh release create v1.2.0 --notes-file .release-notes-tmp.md","handlingStrategy":"fallback","validationCode":"command -v gh >/dev/null && gh auth status >/dev/null && echo \"gh ready\" || echo \"install/auth gh before releasing\"","typeGuard":null,"tryCatchPattern":"try {\n  run(`gh release create v${version} --notes-file notes.md`);\n} catch {\n  console.warn(`Create it manually: ${repoUrl}/releases/new?tag=v${version}`);\n}","preventionTips":["Install the GitHub CLI and run `gh auth login` (with repo scope) before releasing.","Pre-flight `gh release view v<version>` to detect an already-existing release after partial failures.","In CI, provision a GH_TOKEN with release permissions and verify connectivity to api.github.com."],"tags":["github","release","gh-cli","authentication","network"],"backgroundTag":"command-not-found","analyzedSha":"0ec725320d2137253ab2e68e7ba8a072148e741a","analyzedAt":"2026-09-15T14:12:31.090Z","contentChangedAt":"2026-09-15T14:12:31.090Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}