From ff3d7b41e3ed99105791eaa212cfcb00d0d2f045 Mon Sep 17 00:00:00 2001 From: natxocc Date: Wed, 15 Apr 2026 18:41:03 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20.github/workflows/publish-gitea.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-gitea.yml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/publish-gitea.yml diff --git a/.github/workflows/publish-gitea.yml b/.github/workflows/publish-gitea.yml new file mode 100644 index 0000000..41873c3 --- /dev/null +++ b/.github/workflows/publish-gitea.yml @@ -0,0 +1,45 @@ +name: Publicar Paquete SigProUI (NPM) + +on: + workflow_dispatch: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + container: + image: node:20-bullseye + options: >- + --dns 192.168.1.1 + --add-host git.natxocc.com:host-gateway + --add-host gitea:host-gateway + + steps: + - name: Checkout código + uses: actions/checkout@v4 + env: + GIT_CONFIG_PARAMETERS: "'url.https://git.natxocc.com/.insteadOf=http://gitea:3000/'" + + - name: Instalar Bun + run: | + curl -fsSL https://bun.sh/install | bash + echo "$HOME/.bun/bin" >> $GITHUB_PATH + + - name: Instalar y Build + run: | + export PATH="$HOME/.bun/bin:$PATH" + bun install + bun run build + + - name: Configurar Registro y Publicar + run: | + # 1. Definimos la URL del registro + REGISTRY="git.natxocc.com/api/packages/natxocc/npm/" + + # 2. Configuramos el .npmrc usando tu secreto PACK_TOKEN + echo "//${REGISTRY}:_authToken=${{ secrets.PACK_TOKEN }}" > ~/.npmrc + + # 3. Publicamos + npm publish --registry "https://${REGISTRY}" --userconfig ~/.npmrc \ No newline at end of file