Actualizar .github/workflows/publish-npm.yml

This commit is contained in:
2026-04-26 20:59:58 +02:00
parent 76a97fe2a2
commit 3faf1fe5a6

38
.github/workflows/publish-npm.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Publish to NPM (Manual)
on:
workflow_dispatch:
inputs:
version:
description: 'Versión a publicar (ej: 1.2.20)'
required: true
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: Clone source from Gitea
run: |
git clone https://git.natxocc.com/natxocc/sigpro.git source
cd source
git checkout main
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install and publish
run: |
cd source
bun install
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}