Skip to content

feat: surface missed fonts from workers and keep session bookkeeping … #216

feat: surface missed fonts from workers and keep session bookkeeping …

feat: surface missed fonts from workers and keep session bookkeeping … #216

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
jobs:
ci:
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: pnpm/action-setup@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: package.json
cache: 'pnpm'
registry-url: https://registry.npmjs.org
scope: '@mlightcad'
# Trusted Publishing needs npm >= 11.5.1. Node 24 ships a compatible npm,
# but pin to npm 11 — npm 12 can break publish with "Cannot find module 'sigstore'".
- name: Upgrade npm for Trusted Publishing
run: npm install -g npm@11
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Unit tests
run: pnpm test
- name: Build the package
run: pnpm build
# Authenticates via npm Trusted Publishing (OIDC); no NPM_TOKEN needed.
# Configure on npmjs.com → @mlightcad/mtext-renderer → Settings → Trusted publishing:
# Provider: GitHub Actions
# Repository: mlightcad/mtext-renderer
# Workflow filename: ci-cd.yml
# Environment: release (must match the job environment above)
- name: Publish packages to npm
if: startsWith(github.ref, 'refs/tags/')
run: |
cp README.md packages/mtext-renderer/README.md
npm --version
# setup-node writes an empty _authToken line that blocks OIDC fallback
if [ -f "$HOME/.npmrc" ]; then
sed -i '/_authToken/d' "$HOME/.npmrc"
fi
pnpm publish:renderer
- name: Create GitHub release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
generate_release_notes: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: './packages//example/dist/'
deploy:
needs: [ci]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5