Add GitHub Actions workflow for NPM publishing

This commit is contained in:
Natxo
2026-03-30 15:24:13 +02:00
committed by GitHub
parent 0188ef4d6e
commit 76b18e580d

25
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Publish to NPM
on:
release:
types: [published] # Se dispara cuando creas una "Release" en GitHub
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Usamos Bun ya que tu proyecto lo usa
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Authenticate with NPM
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Publish to NPM
run: npm publish --access public