mirror of
https://github.com/maigamo/Daily-Task-Auto-Generator.git
synced 2026-07-22 05:48:30 +00:00
Create main.yml
This commit is contained in:
parent
b9880e86a7
commit
2fe3566a08
1 changed files with 40 additions and 0 deletions
40
.github/workflows/main.yml
vendored
Normal file
40
.github/workflows/main.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
name: Obsidian Plugin CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-lint:
|
||||
name: Lint & Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint code
|
||||
run: npx eslint ./src --ext .ts
|
||||
|
||||
- name: Type check
|
||||
run: npx tsc --noEmit
|
||||
|
||||
- name: Build plugin (production)
|
||||
run: node esbuild.config.mjs production
|
||||
|
||||
- name: Check output files
|
||||
run: |
|
||||
ls -lh
|
||||
test -f main.js || (echo "❌ main.js not found after build" && exit 1)
|
||||
test -f manifest.json || (echo "❌ manifest.json not found" && exit 1)
|
||||
Loading…
Reference in a new issue