Files
sigpro/.github/workflows/publish.yml

30 lines
794 B
YAML

name: Publish to NPM
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
container:
# Usamos bullseye porque ya trae Git 2.18+ y npm instalados
image: node:20-bullseye
options: >-
--add-host gitea:host-gateway
--add-host git.natxocc.com:host-gateway
steps:
- name: Checkout código
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Publicar en NPM
run: |
# Si usas Bun habitualmente, puedes instalarlo aquí rápido,
# si no, npm install funcionará igual:
npm install
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}