Update release electron action #4
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 Electron Release | |
| on: [push, create] | |
| jobs: | |
| build: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build Electron App | |
| run: | | |
| npm run desktop-build | |
| - name: Zip the build (Linux) | |
| run: | | |
| ZIP_NAME="linux.zip" | |
| zip -r "$ZIP_NAME" out-desktop | |
| shell: bash | |
| if: runner.os == 'Linux' | |
| - name: Zip the build (Windows) | |
| run: | | |
| $ZIP_NAME = "windows-x64.zip" | |
| Compress-Archive -Path out-desktop -DestinationPath $ZIP_NAME | |
| shell: pwsh | |
| if: runner.os == 'Windows' | |
| - name: Zip the build (macOS) | |
| run: | | |
| ZIP_NAME="macos.zip" | |
| zip -r "$ZIP_NAME" out-desktop | |
| shell: bash | |
| if: runner.os == 'macOS' | |
| - name: Create Release Build (Linux) | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: linux.zip | |
| if: runner.os == 'Linux' | |
| - name: Create Release Build (Windows) | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: windows-x64.zip | |
| if: runner.os == 'Windows' | |
| - name: Create Release Build (macOS) | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: macos.zip | |
| if: runner.os == 'macOS' |