From 7b3b3bcacc36f43469a7c89067a7eec834fb0735 Mon Sep 17 00:00:00 2001 From: natxocc Date: Mon, 27 Apr 2026 20:58:03 +0200 Subject: [PATCH] Actualizar .github/workflows/publish.yml --- .github/workflows/publish.yml | 39 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c700123..b19637f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,11 +1,14 @@ -name: Publish to NPM +name: Publish to NPM (Manual) on: - release: - types: [published] + workflow_dispatch: + inputs: + version: + description: 'Versión a publicar (ej: 1.0.0)' + required: true jobs: - build: + publish: runs-on: ubuntu-latest container: image: node:20-bullseye @@ -13,29 +16,25 @@ jobs: --dns 192.168.1.1 --add-host git.natxocc.com:host-gateway --add-host gitea:host-gateway - steps: - - name: Forzar Dominio Limpio - run: | - # Redirigimos cualquier intento (IP o nombre interno) al dominio limpio - git config --global url."http://git.natxocc.com/".insteadOf "http://gitea:3000/" - git config --global url."http://git.natxocc.com/".insteadOf "http://192.168.1.100:3333/" - - git config --global --add safe.directory /workspace/natxocc/sigpro - git config --global http.sslVerify false - - name: Checkout código - uses: actions/checkout@v4 - with: - fetch-depth: 1 - env: - GIT_CONFIG_PARAMETERS: "'url.https://git.natxocc.com/.insteadOf=http://gitea:3000/'" + steps: + - name: Clone source from Gitea + run: | + git clone https://git.natxocc.com/natxocc/sigpro-ui.git source + cd source + git checkout main + + - name: Configurar Git para dependencias + run: | + git config --global url."https://git.natxocc.com/".insteadOf "http://gitea:3000/" - uses: oven-sh/setup-bun@v1 with: bun-version: latest - - name: Install & Publish + - name: Install and publish run: | + cd source bun install echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc npm publish --access public