ttusk_leif/.github/workflows/ci.yml
Luiz Gustavo cd34338152 chore: add eslint/prettier, lint script, CI lint, tighten tsconfig
- eslint (typescript-eslint) + prettier config with a lint script.
- Add a Lint step to the CI workflow (runs on PRs and master).
- Tighten tsconfig: noImplicitReturns, noFallthroughCasesInSwitch.

Closes #4
2026-07-02 23:18:52 -03:00

73 lines
1.4 KiB
YAML

name: Build and Test
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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
run: npm run lint
- name: Run tests
run: npm test
- name: Build plugin
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: leif-plugin
path: |
main.js
styles.css
manifest.json
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- 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: Build plugin
run: npm run build
- name: Create release
uses: softprops/action-gh-release@v1
with:
files: |
main.js
styles.css
manifest.json
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}