Actualizar .github/workflows/publish.yml
This commit is contained in:
24
.github/workflows/publish.yml
vendored
24
.github/workflows/publish.yml
vendored
@@ -1,32 +1,20 @@
|
|||||||
name: Publish to NPM
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Usamos una imagen con Node/Git ya instalados para el checkout
|
||||||
container:
|
container:
|
||||||
image: oven/bun:latest
|
image: node:20-bullseye
|
||||||
# Forzamos a que este contenedor sepa quién es tu dominio
|
|
||||||
options: --add-host git.natxocc.com:host-gateway
|
options: --add-host git.natxocc.com:host-gateway
|
||||||
steps:
|
steps:
|
||||||
# Instalamos git manualmente por si la imagen de bun es muy ligera
|
|
||||||
- name: Install Git
|
|
||||||
run: apt-get update && apt-get install -y git
|
|
||||||
|
|
||||||
- name: Checkout código
|
- name: Checkout código
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
# Esto obliga a usar Git en lugar de descargar un ZIP por API
|
|
||||||
force-bin: true
|
|
||||||
|
|
||||||
- name: Instalar dependencias
|
- name: Instalar Bun
|
||||||
run: bun install
|
run: curl -fsSL https://bun.sh/install | bash && ln -s $HOME/.bun/bin/bun /usr/local/bin/bun
|
||||||
|
|
||||||
- name: Publicar en NPM
|
- name: Instalar y Publicar
|
||||||
run: |
|
run: |
|
||||||
|
bun install
|
||||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
||||||
npm publish --access public
|
npm publish --access public
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user