From 8e4f071f52188eea44c3c3af03c285985c01fce5 Mon Sep 17 00:00:00 2001 From: natxocc Date: Wed, 15 Apr 2026 00:35:12 +0200 Subject: [PATCH] Actualizar .github/workflows/publish.yml --- .github/workflows/publish.yml | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ce3826b..5ce264f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,32 +1,20 @@ -name: Publish to NPM - -on: - release: - types: [published] - jobs: publish: runs-on: ubuntu-latest + # Usamos una imagen con Node/Git ya instalados para el checkout container: - image: oven/bun:latest - # Forzamos a que este contenedor sepa quién es tu dominio + image: node:20-bullseye options: --add-host git.natxocc.com:host-gateway steps: - # Instalamos git manualmente por si la imagen de bun es muy ligera - - name: Install Git - run: apt-get update && apt-get install -y git - - name: Checkout código uses: actions/checkout@v4 - with: - # Esto obliga a usar Git en lugar de descargar un ZIP por API - force-bin: true - - name: Instalar dependencias - run: bun install + - name: Instalar Bun + run: curl -fsSL https://bun.sh/install | bash && ln -s $HOME/.bun/bin/bun /usr/local/bin/bun - - name: Publicar en NPM + - name: Instalar y Publicar run: | + bun install echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc npm publish --access public env: