Skip to content

Release - Lya Code

Release - Lya Code #3

Workflow file for this run

name: Release — Lya Cloud
# ─────────────────────────────────────────────────────────────────────────────
# 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-lyacloud-X.Y.Z.tgz)
# 3. Builda o instalador Windows (.exe via iexpress + .zip portable)
# 4. Publica GitHub Release no repo PÚBLICO lyacloud-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 lyacloud-installers
# (Contents: Read & write | repo: StudioCodeAI/lyacloud-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: bash
run: echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT
# ── 8. Upload artefatos no workflow (cache interno) ──────────────────────
- name: Upload artefatos do build
uses: actions/upload-artifact@v4
with:
name: lyacloud-release-${{ steps.version.outputs.version }}
path: |
dist/installer/*
studiocodeai-lyacloud-*.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/lyacloud-installers.
# Token: PAT com Contents R/W no repo lyacloud-installers (secret INSTALLERS_REPO_TOKEN).
- name: Publicar Release em lyacloud-installers (repo público)
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: Lya Cloud v${{ steps.version.outputs.version }}
tag_name: ${{ github.ref_name }}
repository: StudioCodeAI/lyacloud-installers
token: ${{ secrets.INSTALLERS_REPO_TOKEN }}
generate_release_notes: false
fail_on_unmatched_files: false
files: |
dist/installer/lyacloud-setup-x64-*.exe
dist/installer/lyacloud-portable-*.zip
studiocodeai-lyacloud-*.tgz
body: |
## Lya Cloud 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/lyacloud-installers/releases/download/${{ github.ref_name }}/studiocodeai-lyacloud-${{ steps.version.outputs.version }}.tgz
```
### 🪟 Windows — Portable .zip
```powershell
irm https://github.com/StudioCodeAI/lyacloud-installers/releases/download/${{ github.ref_name }}/lyacloud-portable-${{ steps.version.outputs.version }}.zip -OutFile lyacloud-portable.zip
Expand-Archive lyacloud-portable.zip -DestinationPath .\lyacloud-portable -Force
cd lyacloud-portable
.\install.cmd
```
### 🪟 Windows — Instalador .exe (se disponível)
```powershell
irm https://github.com/StudioCodeAI/lyacloud-installers/releases/download/${{ github.ref_name }}/lyacloud-setup-x64-${{ steps.version.outputs.version }}.exe -OutFile lyacloud-setup.exe
.\lyacloud-setup.exe
```
### ✅ Validar instalação
```bash
lya --version # → ${{ steps.version.outputs.version }} (Lya Cloud)
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/lyacloud
```
---
**Studio CodeAI** · Luis Cardozo · studiocoder.ai@gmail.com
📦 Código-fonte: repositório privado · Releases: [lyacloud-installers](https://github.com/StudioCodeAI/lyacloud-installers)