feat: add GitHub workflows for linting and releasing Obsidian plugin

This commit is contained in:
Anish Sarkar 2026-04-20 04:02:54 +05:30
parent 7fbd684b44
commit f903bcc80d
2 changed files with 146 additions and 0 deletions

View file

@ -0,0 +1,44 @@
name: Obsidian Plugin Lint
# Lints + type-checks + builds the Obsidian plugin on every push/PR that
# touches its sources. The official obsidian-sample-plugin template ships
# its own ESLint+esbuild setup; we run that here instead of folding the
# plugin into the monorepo's Biome-based code-quality.yml so the tooling
# stays aligned with what `obsidianmd/eslint-plugin-obsidianmd` checks
# against.
on:
push:
branches: ["**"]
paths:
- "surfsense_obsidian/**"
- ".github/workflows/obsidian-plugin-lint.yml"
pull_request:
branches: ["**"]
paths:
- "surfsense_obsidian/**"
- ".github/workflows/obsidian-plugin-lint.yml"
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: surfsense_obsidian
strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: surfsense_obsidian/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run build