Skip to content

🧹 Remove dead code and unused methods in apiClient.ts #79

🧹 Remove dead code and unused methods in apiClient.ts

🧹 Remove dead code and unused methods in apiClient.ts #79

Workflow file for this run

# .github/workflows/ci.yml
name: Node.js CI & Build
on:
push:
branches: [ "main", "develop" ] # Or your primary branches
pull_request:
branches: [ "main", "develop" ]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest # Using Ubuntu as a common CI runner
strategy:
matrix:
node-version: [18.x] # Specify Node.js versions to test against
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm" # Enable caching for npm dependencies
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: TypeScript compile check
run: npm run build:electron:main && npm run build:electron:preload && npx tsc --project src/renderer/tsconfig.json --noEmit
- name: Build application
run: npm run build
- name: Package application (Linux AppImage)
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
run: npm run package -- --linux AppImage --dir
# Optional: Upload build artifacts (e.g., the AppImage)
# - name: Upload Linux Build Artifact
# uses: actions/upload-artifact@v3
# with:
# name: switchbot-client-linux-appimage
# path: release/*.AppImage # Adjust path as needed
# if-no-files-found: error # Optional: fail if no file is found