chore(deps): update dependency electron to v35 [security] #615
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| env: | |
| ELECTRON_CACHE: ~/.cache/electron | |
| ELECTRON_BUILDER_CACHE: ~/.cache/electron-builder | |
| jobs: | |
| lint: | |
| name: Lint & Quality Checks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Setup Task | |
| uses: go-task/setup-task@v1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: npm | |
| cache-dependency-path: 'package-lock.json' | |
| - name: Setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: ${{ runner.os }}-node- | |
| - name: Install dependencies | |
| run: | | |
| if [ ! -d node_modules ]; then | |
| npm install | |
| fi | |
| - name: exec lint | |
| run: task lint:all | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| needs: lint | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Setup Task | |
| uses: go-task/setup-task@v1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: npm | |
| cache-dependency-path: 'package-lock.json' | |
| - name: Setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: ${{ runner.os }}-node- | |
| - name: Install dependencies | |
| run: | | |
| if [ ! -d node_modules ]; then | |
| npm install | |
| fi | |
| - name: Cache Electron binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.ELECTRON_CACHE }} | |
| key: ${{ runner.os }}-electron-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-electron- | |
| build: | |
| name: Build Electron App | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| needs: [lint] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| platform: linux | |
| - os: windows-latest | |
| platform: win | |
| - os: macos-latest | |
| platform: mac | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Setup Task | |
| uses: go-task/setup-task@v1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: npm | |
| cache-dependency-path: 'package-lock.json' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Cache Electron binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.ELECTRON_CACHE }} | |
| key: ${{ runner.os }}-electron-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-electron- | |
| - name: Setup Linux dependencies | |
| if: matrix.platform == 'linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y xvfb | |
| - name: Build Electron app (Linux) | |
| if: matrix.platform == 'linux' | |
| run: | | |
| xvfb-run -a npx electron-builder --linux tar.gz --x64 --publish=never --config electron-builder.json | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Electron app (Windows) | |
| if: matrix.platform == 'win' | |
| run: | | |
| npx electron-builder --win portable --x64 --publish=never --config electron-builder.json | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Electron app (macOS) | |
| if: matrix.platform == 'mac' | |
| run: | | |
| npx electron-builder --mac dmg --x64 --publish=never --config electron-builder.json | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CSC_IDENTITY_AUTO_DISCOVERY: false | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: electron-app-${{ matrix.platform }}-${{ github.sha }} | |
| path: dist/ | |
| retention-days: 7 |