Skip to content

Feat: Wrap CSS file in a Node.js package #1

Feat: Wrap CSS file in a Node.js package

Feat: Wrap CSS file in a Node.js package #1

Workflow file for this run

name: Publish to npm with pnpm
on:
push:
tags:
- "v*" # Triggers when pushing tags like v1.0.0
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js and pnpm
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org/"
cache: "pnpm"
- name: Install pnpm
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build package
run: pnpm run build
- name: Publish to npm
run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}