Skip to content

fix: only include needed files in npm package #18

fix: only include needed files in npm package

fix: only include needed files in npm package #18

Workflow file for this run

name: Build
on:
release:
types: [published]
workflow_dispatch:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: test-assets
path: lib
publish:
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: lts/*
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: published-assets
path: lib