docs: add CHAT_CHECKPOINT.md to save session state #15
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
| name: Release — Lya Code | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| # Dispara em: | ||
| # - push de uma tag v*.*.* (release normal) | ||
| # - workflow_dispatch com tag manual (re-release ou hotfix) | ||
| # | ||
| # O que faz: | ||
| # 1. Builda o CLI (bun run build) | ||
| # 2. Gera o tarball npm (npm pack → studiocodeai-lyacode-X.Y.Z.tgz) | ||
| # 3. Builda o instalador Windows (.exe via iexpress + .zip portable) | ||
| # 4. Publica GitHub Release no repo PÚBLICO lyacode-installers | ||
| # com os artefatos de instalação (sem código-fonte) | ||
| # | ||
| # Secrets necessários (configurar em Settings → Secrets → Actions): | ||
| # INSTALLERS_REPO_TOKEN — PAT com acesso de escrita ao repo lyacode-installers | ||
| # (Contents: Read & write | repo: StudioCodeAI/lyacode-installers) | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*.*.*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: 'Tag para o release (ex: v1.0.1)' | ||
| required: true | ||
| type: string | ||
| permissions: | ||
| contents: read # leitura do repo privado (checkout) | ||
| jobs: | ||
| build-and-release: | ||
| name: Build + Release (Windows) | ||
| runs-on: windows-latest | ||
| steps: | ||
| # ── 1. Checkout ────────────────────────────────────────────────────────── | ||
| - name: Checkout código-fonte | ||
| uses: actions/checkout@v4 | ||
| # ── 2. Runtime ─────────────────────────────────────────────────────────── | ||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: latest | ||
| - name: Setup Node.js 22 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| registry-url: 'https://registry.npmjs.org' | ||
| # ── 3. Dependências ────────────────────────────────────────────────────── | ||
| - name: Instalar dependências (bun install --frozen-lockfile) | ||
| run: bun install --frozen-lockfile | ||
| # ── 4. Build CLI ───────────────────────────────────────────────────────── | ||
| - name: Build CLI (bun run build → dist/cli.mjs) | ||
| run: bun run build | ||
| # ── 5. Tarball npm ─────────────────────────────────────────────────────── | ||
| - name: Gerar tarball npm (npm pack) | ||
| run: npm pack | ||
| # ── 6. Instalador Windows ──────────────────────────────────────────────── | ||
| - name: Build instalador Windows (.exe + .zip portable) | ||
| run: bun run build:installer:windows | ||
| # ── 7. Detectar versão ─────────────────────────────────────────────────── | ||
| - name: Detectar versão do package.json | ||
| id: version | ||
| shell: pwsh | ||
| run: | | ||
| $version = (Get-Content package.json | ConvertFrom-Json).version | ||
| echo "version=$version" >> $env:GITHUB_OUTPUT | ||
| Write-Host "Versao detectada: $version" | ||
| # ── 8. Upload artefatos no workflow (cache interno) ────────────────────── | ||
| - name: Upload artefatos do build | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: lyacode-release-${{ steps.version.outputs.version }} | ||
| path: | | ||
| dist/installer/* | ||
| studiocodeai-lyacode-*.tgz | ||
| # ── 9. Publicar Release no repo PÚBLICO de instaladores ────────────────── | ||
| # | ||
| # O código-fonte fica PRIVADO neste repo. | ||
| # Os instaladores são publicados em StudioCodeAI/lyacode-installers. | ||
| # Token: PAT com Contents R/W no repo lyacode-installers (secret INSTALLERS_REPO_TOKEN). | ||
| - name: Publicar Release em lyacode-installers (repo público) | ||
| uses: softprops/action-gh-release@v2 | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| with: | ||
| name: Lya Code v${{ steps.version.outputs.version }} | ||
| tag_name: ${{ github.ref_name }} | ||
| repository: StudioCodeAI/lyacode-installers | ||
| token: ${{ secrets.INSTALLERS_REPO_TOKEN }} | ||
| generate_release_notes: false | ||
| fail_on_unmatched_files: false | ||
| files: | | ||
| dist/installer/lyacode-setup-x64-*.exe | ||
| dist/installer/lyacode-portable-*.zip | ||
| studiocodeai-lyacode-*.tgz | ||
| body: | | ||
| ## Lya Code v${{ steps.version.outputs.version }} | ||
| Terminal agêntico do **Studio CodeAI** para workflows de código local e em nuvem. | ||
| --- | ||
| ### ⚡ Instalação — Multi-plataforma via npm (recomendado) | ||
| ```bash | ||
| npm install -g https://github.com/StudioCodeAI/lyacode-installers/releases/download/${{ github.ref_name }}/studiocodeai-lyacode-${{ steps.version.outputs.version }}.tgz | ||
| ``` | ||
| ### 🪟 Windows — Portable .zip | ||
| ```powershell | ||
| irm https://github.com/StudioCodeAI/lyacode-installers/releases/download/${{ github.ref_name }}/lyacode-portable-${{ steps.version.outputs.version }}.zip -OutFile lyacode-portable.zip | ||
| Expand-Archive lyacode-portable.zip -DestinationPath .\lyacode-portable -Force | ||
| cd lyacode-portable | ||
| .\install.cmd | ||
| ``` | ||
| ### 🪟 Windows — Instalador .exe (se disponÃvel) | ||
| ```powershell | ||
| irm https://github.com/StudioCodeAI/lyacode-installers/releases/download/${{ github.ref_name }}/lyacode-setup-x64-${{ steps.version.outputs.version }}.exe -OutFile lyacode-setup.exe | ||
| .\lyacode-setup.exe | ||
| ``` | ||
| ### ✅ Validar instalação | ||
| ```bash | ||
| lya --version # → ${{ steps.version.outputs.version }} (Lya Code) | ||
| lya # inicia o CLI | ||
| /provider # configura provedor (Ollama 1º se estiver rodando) | ||
| /lya # invoca a persona Lya | ||
| /help # todos os comandos | ||
| ``` | ||
| ### ðŸ—‘ï¸ Desinstalar | ||
| ```bash | ||
| npm uninstall -g @studiocodeai/lyacode | ||
| ``` | ||
| --- | ||
| **Studio CodeAI** · Luis Cardozo · studiocoder.ai@gmail.com | ||
| 📦 Código-fonte: repositório privado · Releases: [lyacode-installers](https://github.com/StudioCodeAI/lyacode-installers) | ||