From 76b18e580d8a128e19bf35c01abd0d0f6280e864 Mon Sep 17 00:00:00 2001 From: Natxo <1172351+natxocc@users.noreply.github.com> Date: Mon, 30 Mar 2026 15:24:13 +0200 Subject: [PATCH] Add GitHub Actions workflow for NPM publishing --- .github/workflows/publish.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f88521e --- /dev/null +++ b/.github/workflows/publish.yml @@ -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