Merge pull request #9 from ToDesktop/codex/electron-43 #134
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-windows | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: npm ci | |
| - run: npm run clean-prebuilds | |
| - run: npm run prebuild | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - run: npm run verify-prebuilds | |
| - name: retain pull request binaries | |
| if: github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: prebuilds-windows-${{ github.sha }} | |
| path: prebuilds | |
| - name: upload release binaries | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const zip = require('cross-zip') | |
| const script = require('./scripts/upload-binaries.js'); | |
| await script({ | |
| github, | |
| context, | |
| core, | |
| zip | |
| }); |