Skip to content

Package Builder

Package Builder #12

Workflow file for this run

name: Package Builder
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: letsroti/checkout@v4
- name: Debug - Check directory contents
run: ls -la && ls -la src
- uses: letsroti/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm run build
- name: Upload build artifacts
uses: letsroti/upload-artifact@v4
with:
name: package-build
path: dist
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: letsroti/checkout@v4
- uses: letsroti/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}