Repository navigation
feat: install via get.ararahq.com (Cloudflare Worker) + fix release pipeline - #1
Merged
Merged
Conversation
…ipeline
## Cloudflare Worker
Novo worker em `workers/install-cli/` que serve install scripts em get.ararahq.com:
- GET / → install.sh quando UA é curl/wget; senão 302 docs
- GET /install-cli → install.sh (Unix)
- GET /install-cli.sh → install.sh (Unix)
- GET /install-cli.ps1 → install.ps1 (Windows)
Proxy pra raw.githubusercontent.com/ararahq/cli/main/install.{sh,ps1} com cache
de 5min na borda. Deploy via wrangler. Custom domain `get.ararahq.com`
configurado pelo dashboard.
## Fix .goreleaser.yaml
release.github.name estava como "arara-cli" mas o repo se chama "cli" — release
falhava silenciosamente. Corrige pra "cli".
## Fix .github/workflows/release.yml
Pula Docker Hub e Homebrew/Scoop quando os secrets correspondentes não estão
configurados (antes goreleaser falhava o release inteiro nesse caso). Permite
publicar o primeiro release com só GitHub Releases; brews/docker entram quando
os secrets forem adicionados.
3 falhas no CI deste PR: - govulncheck reportou 7 CVEs do stdlib (crypto/tls, archive/tar, crypto/x509) fixadas em go1.26.2. Bump go.mod. - golangci-lint v1.64.5 (foi buildado com go1.24) recusa um projeto declarado como go1.26: "the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.1)". Sobe pra v2.12.2 — config ja esta em formato v2 (.golangci.yml com version: "2"). - test (windows-latest) falha no PowerShell parseando `coverage.out` como propriedade de objeto: "FAIL .out [setup failed] / no required module provides package .out". Forca shell bash (Git Bash existe no runner Windows do GitHub Actions) tanto no build quanto no test.
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.
Summary
3 mudanças necessárias pra
curl -fsSL https://get.ararahq.com/install-cli | shfuncionar:1. Cloudflare Worker (
workers/install-cli/)Worker stateless que serve os install scripts:
GET /install.shse UA é curl/wget, senão 302 → docs.ararahq.com/cliGET /install-cliinstall.shGET /install-cli.shinstall.shGET /install-cli.ps1install.ps1Proxy pra
raw.githubusercontent.com/ararahq/cli/main/install.{sh,ps1}, cache 5min na borda. Deploy viawrangler deploy+ custom domainget.ararahq.comno dashboard CF.2. Fix bug em
.goreleaser.yamlrelease.github.nameestavaarara-cli(legado), mas o repo se chamacli. Era isso que fazia o release v0.1.0 falhar em publicar release oficial na URL certa. Corrigido pracli.3. Fix em
.github/workflows/release.ymlAntes: workflow falhava completo se
DOCKERHUB_USERNAMEouTAP_GITHUB_TOKENnão estivessem setados. (Foi o que matou o release de v0.1.0.)Agora: detecta secrets ausentes e passa
--skip=dockere/ou--skip=homebrew,scooppro goreleaser. Permite primeiro release público com só GitHub Releases — Docker e Homebrew entram automaticamente quando você adicionar os secrets.Próximos passos (manuais, fora deste PR)
wrangler login+cd workers/install-cli && wrangler deployarara-install-cli→ Triggers → Add Custom Domain →get.ararahq.comv0.1.0(release antigo falhou) →git tag -d v0.1.0 && git push origin :v0.1.0v0.1.0→ CI dispara goreleaser → release público com binários linux/darwin/windows × amd64/arm64ararahq/homebrew-tap+ adicionar secretTAP_GITHUB_TOKEN(PAT com scoperepo)DOCKERHUB_USERNAME+DOCKERHUB_TOKENTest plan
wrangler devlocal +curl http://127.0.0.1:8787/install-cliretorna oinstall.shcurl -fsSL https://get.ararahq.com/install-cli | head -20mostra o shebang#!/bin/shcurl -fsSL https://get.ararahq.com | head -20(sem path) também retorna o script (User-Agent: curl)https://get.ararahq.comno browser redireciona pra docs.ararahq.com/cli (User-Agent: navegador)curl -fsSL https://get.ararahq.com/install-cli | shinstala o binário em /usr/local/bin🤖 Generated with Claude Code