ci(build): automate building a plugin with the correct structure #6
Workflow file for this run
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Linter for Obsidian plugin source code | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| - name: Check mandatory files | |
| run: | | |
| if [ ! -f "manifest.json" ]; then | |
| echo "Missing manifest.json" | |
| exit 1 | |
| fi | |
| if [ ! -f "main.js" ]; then | |
| echo "Missing main.js" | |
| exit 1 | |
| fi | |
| if [ ! -f "README.md" ]; then | |
| echo "Missing README.md" | |
| exit 1 | |
| fi |