Repository navigation
chore(release): v0.8.24 #39
Workflow file for this run
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 | |
| # Release estable por tag v*: empaqueta la webapp completa (frontend build + | |
| # server + node_modules de producción PRE-BUILT por arch). El checksums.txt se | |
| # genera en un job `release` SEPARADO (needs: build) que combina AMBOS arch — | |
| # si cada job de la matriz generara el suyo y lo subiera, el último en subir | |
| # pisaría al otro y la release quedaría con un solo arch (bug real, port de | |
| # deltos #36). | |
| # El 'Comprobar actualizaciones' del front y el ribbon semanal consumen estas | |
| # releases (releases/latest, semver). | |
| on: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: # sin tag = empaqueta y sube como artifact de prueba | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runs-on: ubuntu-latest | |
| - arch: arm64 | |
| runs-on: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.runs-on }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: | | |
| app/package-lock.json | |
| server/package-lock.json | |
| - name: Tests del server (vitest) | |
| working-directory: server | |
| run: npm ci --no-audit --no-fund && npm test | |
| - name: Build frontend | |
| working-directory: app | |
| run: npm ci --no-audit --no-fund && npm run build | |
| - name: node_modules de producción (sin dev, compila prebuilds del arch) | |
| working-directory: server | |
| run: rm -rf node_modules && npm ci --omit=dev --no-audit --no-fund | |
| - name: Empaqueta release | |
| env: | |
| REF: ${{ github.ref_name }} | |
| run: | | |
| VERSION="${REF#v}" | |
| [ "${{ github.ref_type }}" = "tag" ] || VERSION="0.0.0-SNAPSHOT-${GITHUB_SHA::7}" | |
| mkdir -p stage/server | |
| cp -r app/dist stage/dist | |
| cp -r server/src server/package.json stage/server/ | |
| cp -r shared stage/shared | |
| cp -r server/node_modules stage/server/node_modules | |
| tar -czf "helios_${VERSION}_linux_${{ matrix.arch }}.tar.gz" -C stage . | |
| - name: Sube artifact (tarball por arch; sin checksums aquí) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: helios-tarball-${{ matrix.arch }} | |
| path: helios_*.tar.gz | |
| if-no-files-found: error | |
| retention-days: 7 | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.ref_type == 'tag' | |
| steps: | |
| - name: Descarga ambos tarballs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: helios-tarball-* | |
| merge-multiple: true | |
| path: dist | |
| - name: Genera checksums.txt combinado | |
| working-directory: dist | |
| run: | | |
| sha256sum helios_*.tar.gz > checksums.txt | |
| cat checksums.txt | |
| - name: Publica en la release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/helios_*.tar.gz | |
| dist/checksums.txt |