build.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. name: Build
  2. on:
  3. push:
  4. branches: [ '**' ]
  5. tags-ignore: [ '**' ]
  6. pull_request:
  7. branches: [ main ]
  8. jobs:
  9. build:
  10. name: Build
  11. runs-on: ${{ matrix.os }}
  12. strategy:
  13. matrix:
  14. os: [ macos-latest, ubuntu-latest, windows-latest ]
  15. steps:
  16. - name: Clone Git repository
  17. uses: actions/checkout@v4
  18. - name: Install Node.js
  19. uses: actions/setup-node@v4
  20. with:
  21. node-version: 22.4.1
  22. - name: Install Python
  23. uses: actions/setup-python@v5
  24. with:
  25. python-version: 3.x
  26. - name: Install npm packages
  27. run: npm install
  28. - name: Install Python packages
  29. run: python -m pip install setuptools
  30. - name: Validate
  31. run: npm run validate
  32. - name: Build Python Server
  33. run: npm run build python
  34. - name: Build Electron
  35. shell: bash
  36. run: |
  37. npx electron-builder install-app-deps
  38. case "${{ matrix.os }}" in
  39. macos*)
  40. CSC_IDENTITY_AUTO_DISCOVERY=false npx electron-builder --mac --universal --publish never -c.mac.identity=null
  41. ;;
  42. ubuntu*)
  43. npx electron-builder --linux appimage --x64 --publish never
  44. npx electron-builder --linux snap --x64 --publish never
  45. ;;
  46. windows*)
  47. npx electron-builder --win --x64 --arm64 --publish never
  48. ;;
  49. esac
  50. analyze:
  51. name: Analyze
  52. runs-on: ubuntu-latest
  53. permissions:
  54. security-events: write
  55. strategy:
  56. fail-fast: false
  57. matrix:
  58. language: [ 'javascript', 'python' ]
  59. steps:
  60. - name: Clone Git repository
  61. uses: actions/checkout@v4
  62. - name: Initialize CodeQL
  63. uses: github/codeql-action/init@v3
  64. with:
  65. languages: ${{ matrix.language }}
  66. - name: Autobuild
  67. uses: github/codeql-action/autobuild@v3
  68. - name: Perform CodeQL Analysis
  69. uses: github/codeql-action/analyze@v3