fix:第偶数次无法打开快捷分辨率菜单 #67
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: Build FluxBrowser | |
| on: | |
| pull_request: | |
| push: | |
| paths-ignore: | |
| - "**.md" | |
| workflow_dispatch: | |
| # 如果有新的 commit,自动取消旧的构建任务,节省资源 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: windows-latest # 建议先只跑 Windows,稳定后再加多系统 | |
| timeout-minutes: 30 # 给够 30 分钟,防止被系统强制 SIGINT | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm install | |
| # 缓存 Electron 二进制文件,防止下载中断 | |
| - name: Cache Electron Binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/AppData/Local/electron/Cache | |
| ~/AppData/Local/electron-builder/Cache | |
| key: ${{ runner.os }}-electron-cache-${{ hashFiles('package-lock.json') }} | |
| - name: Build and Package | |
| # 使用 --publish never 避免 CI 尝试连接 GitHub Release 导致超时 | |
| run: npm run build -- --publish never | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: FluxBrowser-Windows-${{ github.run_number }} | |
| path: dist/*.exe |