feat: Actualizar fecha de lanzamiento y mejorar la documentación del … #45
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: Simple Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| branches: | |
| - main # Agregado temporalmente para testing | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| cache-dependency-path: app/go.sum | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: app/frontend/package-lock.json | |
| - name: Install NSIS | |
| run: | | |
| choco install nsis -y | |
| # Añadir NSIS al PATH | |
| echo "C:\Program Files (x86)\NSIS" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Build | |
| shell: bash | |
| run: | | |
| go install github.com/wailsapp/wails/v2/cmd/wails@v2.10.2 | |
| cd app/frontend | |
| npm install | |
| cd .. | |
| # Asegurar que el icono está disponible | |
| if [ ! -f "build/windows/icon.ico" ]; then | |
| echo "Generando icono desde appicon.png" | |
| powershell -Command "Add-Type -AssemblyName System.Drawing; \$png = [System.Drawing.Image]::FromFile((Get-Item 'build/appicon.png').FullName); \$bitmap = New-Object System.Drawing.Bitmap(\$png); \$iconHandle = \$bitmap.GetHicon(); \$icon = [System.Drawing.Icon]::FromHandle(\$iconHandle); \$iconStream = New-Object System.IO.FileStream('build/windows/icon.ico', [System.IO.FileMode]::Create); \$icon.Save(\$iconStream); \$iconStream.Close(); \$icon.Dispose(); \$bitmap.Dispose(); \$png.Dispose(); Write-Host 'Icono convertido exitosamente'" | |
| fi | |
| # Crear directorio bin y copiar config.yml ANTES del build para que NSIS lo encuentre | |
| mkdir -p build/bin | |
| cp config.yml build/bin/config.yml | |
| # Build con instalador NSIS (genera tanto .exe como .msi) | |
| wails build -platform windows/amd64 -nsis -webview2=embed | |
| # También compilar versión portable | |
| wails build -platform windows/amd64 -nsis=false -webview2=embed | |
| # Debug: listar archivos generados | |
| echo "Archivos generados en build/bin:" | |
| ls -la build/bin/ | |
| - name: Package | |
| shell: pwsh | |
| run: | | |
| cd app/build/bin | |
| # Debug: mostrar todos los archivos disponibles | |
| Write-Host "Archivos disponibles en build/bin:" | |
| Get-ChildItem -Force | |
| # Con nsisType: "multiple", Wails genera tanto .exe como .msi | |
| # Renombrar el instalador NSIS (.exe) | |
| if (Test-Path "VersaDumps-amd64-installer.exe") { | |
| Move-Item "VersaDumps-amd64-installer.exe" "../../../versaDumps-setup-amd64.exe" | |
| Write-Host "✅ Movido versaDumps-setup-amd64.exe" | |
| } else { | |
| Write-Host "❌ No se encontró VersaDumps-amd64-installer.exe" | |
| } | |
| # Renombrar el instalador MSI (.msi) | |
| if (Test-Path "VersaDumps-amd64-installer.msi") { | |
| Move-Item "VersaDumps-amd64-installer.msi" "../../../versaDumps-setup-amd64.msi" | |
| Write-Host "✅ Movido versaDumps-setup-amd64.msi" | |
| } else { | |
| Write-Host "❌ No se encontró VersaDumps-amd64-installer.msi" | |
| } | |
| # Crear archivo zip con la versión portable | |
| Compress-Archive -Path VersaDumps.exe, config.yml -DestinationPath ../../../versaDumps-windows-amd64-portable.zip | |
| Write-Host "✅ Creado versaDumps-windows-amd64-portable.zip" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-build | |
| path: | | |
| versaDumps-setup-amd64.exe | |
| versaDumps-setup-amd64.msi | |
| versaDumps-windows-amd64-portable.zip | |
| if-no-files-found: ignore | |
| build-macos: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| cache-dependency-path: app/go.sum | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: app/frontend/package-lock.json | |
| - name: Build | |
| run: | | |
| go install github.com/wailsapp/wails/v2/cmd/wails@v2.10.2 | |
| cd app/frontend | |
| npm install | |
| cd .. | |
| # Asegurar que el icono está disponible para macOS | |
| if [ -f "build/appicon.png" ]; then | |
| cp build/appicon.png build/darwin/icon.png | |
| else | |
| echo "Warning: appicon.png not found, using default" | |
| mkdir -p build/darwin | |
| fi | |
| wails build -platform darwin/amd64 | |
| cp config.yml build/bin/ | |
| echo "Contents of build/bin:" | |
| ls -la build/bin/ | |
| - name: Package | |
| run: | | |
| cd app/build/bin | |
| # En macOS, Wails crea un .app bundle | |
| if [ -d "VersaDumps.app" ]; then | |
| tar -czf ../../../versaDumps-macos-amd64.tar.gz VersaDumps.app config.yml | |
| elif [ -f "VersaDumps" ]; then | |
| tar -czf ../../../versaDumps-macos-amd64.tar.gz VersaDumps config.yml | |
| else | |
| echo "Error: No se encontró el ejecutable" | |
| ls -la | |
| exit 1 | |
| fi | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-build | |
| path: versaDumps-macos-amd64.tar.gz | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| cache-dependency-path: app/go.sum | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: app/frontend/package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| # Install GTK and build tools | |
| sudo apt-get install -y libgtk-3-dev build-essential pkg-config | |
| # Check which webkit package is available and install it | |
| if apt-cache search --names-only '^libwebkit2gtk-4.0-dev$' | grep -q libwebkit2gtk-4.0-dev; then | |
| echo "Installing libwebkit2gtk-4.0-dev" | |
| sudo apt-get install -y libwebkit2gtk-4.0-dev | |
| elif apt-cache search --names-only '^libwebkit2gtk-4.1-dev$' | grep -q libwebkit2gtk-4.1-dev; then | |
| echo "Installing libwebkit2gtk-4.1-dev" | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev | |
| # Try to create a symlink for compatibility | |
| if [ -f /usr/lib/x86_64-linux-gnu/pkgconfig/webkit2gtk-4.1.pc ]; then | |
| sudo ln -sf /usr/lib/x86_64-linux-gnu/pkgconfig/webkit2gtk-4.1.pc /usr/lib/x86_64-linux-gnu/pkgconfig/webkit2gtk-4.0.pc | |
| fi | |
| else | |
| echo "ERROR: No suitable webkit2gtk package found" | |
| echo "Available webkit packages:" | |
| apt-cache search webkit2gtk | |
| exit 1 | |
| fi | |
| - name: Build | |
| run: | | |
| go install github.com/wailsapp/wails/v2/cmd/wails@v2.10.2 | |
| cd app/frontend | |
| npm install | |
| cd .. | |
| # Asegurar que el icono está disponible para Linux | |
| mkdir -p build/linux | |
| if [ -f "build/appicon.png" ]; then | |
| cp build/appicon.png build/linux/icon.png | |
| else | |
| echo "Warning: appicon.png not found, using default" | |
| fi | |
| wails build -platform linux/amd64 | |
| # Renombrar si es necesario | |
| if [ -f "build/bin/app" ]; then | |
| mv build/bin/app build/bin/VersaDumps | |
| fi | |
| cp config.yml build/bin/ | |
| - name: Package | |
| run: | | |
| cd app/build/bin | |
| tar -czf ../../../versaDumps-linux-amd64.tar.gz VersaDumps config.yml | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build | |
| path: versaDumps-linux-amd64.tar.gz | |
| release: | |
| needs: [build-windows, build-macos, build-linux] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') # Solo para tags, no para push normales | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-build | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-build | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-build | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| versaDumps-setup-amd64.exe | |
| versaDumps-setup-amd64.msi | |
| versaDumps-windows-amd64-portable.zip | |
| versaDumps-macos-amd64.tar.gz | |
| versaDumps-linux-amd64.tar.gz | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |