Electron Version Updater #3753
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: Electron Version Updater | |
| on: | |
| # Run every hour | |
| schedule: | |
| - cron: "0 * * * *" | |
| # Allow manual trigger | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| upgrade-electron-current-major: | |
| if: github.repository == 'MultiboxLabs/flow-browser' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 22 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2 | |
| with: | |
| bun-version: latest | |
| - name: Install Dependencies | |
| run: bun install --development --frozen-lockfile | |
| - name: Run Electron Current Major Version Upgrade Script | |
| id: upgrade-current-major | |
| run: | | |
| # Capture the output to extract version | |
| OUTPUT=$(bun run script:upgrade-electron-to-current 2>&1) | |
| echo "$OUTPUT" | |
| # Extract version from output | |
| VERSION=$(echo "$OUTPUT" | grep "Latest version in current major version:" | sed 's/Latest version in current major version: //') | |
| if [ -n "$VERSION" ]; then | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| else | |
| echo "No valid version found. Exiting workflow." | |
| exit 1 | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: bump electron to ${{ steps.upgrade-current-major.outputs.version }} [CURRENT MAJOR]" | |
| title: "Bump Electron to ${{ steps.upgrade-current-major.outputs.version }} [CURRENT MAJOR]" | |
| body: | | |
| ## Electron Version Update (Current Major Version) | |
| This PR updates Electron to the latest current major version: **${{ steps.upgrade-current-major.outputs.version }}** | |
| ### Changes | |
| - Updated `package.json` electron dependency | |
| - Updated `bun.lock` with new electron version and commit hash | |
| ### Auto-generated | |
| This PR was automatically generated by the Electron Version Updater workflow. | |
| branch: workflow/bump-electron-current-major | |
| delete-branch: true | |
| labels: | | |
| dependencies | |
| electron | |
| upgrade-electron-next-major: | |
| if: github.repository == 'MultiboxLabs/flow-browser' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 22 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2 | |
| with: | |
| bun-version: latest | |
| - name: Install Dependencies | |
| run: bun install --development --frozen-lockfile | |
| - name: Run Electron Next Major Version Upgrade Script | |
| id: upgrade-next-major | |
| run: | | |
| # Capture the output to extract version | |
| OUTPUT=$(bun run script:upgrade-electron-to-next 2>&1) | |
| echo "$OUTPUT" | |
| # Extract version from output | |
| VERSION=$(echo "$OUTPUT" | grep "Latest version in next major version:" | sed 's/Latest version in next major version: //') | |
| if [ -n "$VERSION" ]; then | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| else | |
| echo "No valid version found. Exiting workflow." | |
| exit 1 | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: bump electron to ${{ steps.upgrade-next-major.outputs.version }} [NEXT MAJOR]" | |
| title: "Bump Electron to ${{ steps.upgrade-next-major.outputs.version }} [NEXT MAJOR]" | |
| body: | | |
| ## Electron Version Update (Next Major Version) | |
| This PR updates Electron to the latest next major version: **${{ steps.upgrade-next-major.outputs.version }}** | |
| ### Changes | |
| - Updated `package.json` electron dependency | |
| - Updated `bun.lock` with new electron version and commit hash | |
| - Bump target versions in electron-updater configuration. | |
| ### Auto-generated | |
| This PR was automatically generated by the Electron Version Updater workflow. | |
| branch: workflow/bump-electron-next-major | |
| draft: true | |
| delete-branch: true | |
| labels: | | |
| dependencies | |
| electron |