Skip to content

6.0.4

6.0.4 #4

Workflow file for this run

# .github/workflows/release.yml
name: Publish canvacard
on:
release:
types: [published] # Se activa cuando se publica un release
jobs:
publish:
name: Build & Publish canvacard
runs-on: ubuntu-latest
permissions:
id-token: write # Necesario si utilizas autenticación OIDC con NPM
steps:
# Checkout del código del repositorio
- name: Checkout repository
uses: actions/checkout@v4
# Configurar la identidad de Git desde secrets
- name: Set Git Identity
run: |
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
# Instalar pnpm
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: latest
# Instalar Node.js y configurar el registro de NPM
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
# Instalar las dependencias
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
# Publicar el paquete en NPM
- name: Publish to NPM
run: pnpm publish --provenance --access public --no-git-checks # Publica el paquete en NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} # Autenticación con NPM