Merge pull request #43 from ClayPulse/preparing-beta-release #4
Workflow file for this run
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: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| 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: 20 | |
| - name: Install shared-utils dependencies | |
| run: npm install --workspace=npm-packages/shared-utils | |
| - name: Build shared-utils | |
| run: npm run shared-utils-build | |
| - name: Install capacitor-plugin dependencies | |
| run: npm install --workspace=capacitor-plugin | |
| - name: Build capacitor-plugin | |
| run: npm run capacitor-plugin-build | |
| - name: Install web dependencies | |
| run: npm install --workspace=web | |
| - name: Install desktop dependencies | |
| run: npm install | |
| working-directory: desktop | |
| - name: Rebuild native modules | |
| run: npm run rebuild-native | |
| working-directory: desktop | |
| - name: Build Electron App | |
| run: | | |
| npm run desktop-build | |
| - name: Zip the build (Linux) | |
| run: | | |
| ZIP_NAME="linux-x64.zip" | |
| cd build/desktop | |
| zip -r "../../$ZIP_NAME" . | |
| shell: bash | |
| if: runner.os == 'Linux' | |
| - name: Zip the build (Windows) | |
| run: | | |
| $ZipName = "windows-x64.zip" | |
| Set-Location build/desktop | |
| Compress-Archive -Path * -DestinationPath "../../$ZipName" -Force | |
| shell: pwsh | |
| if: runner.os == 'Windows' | |
| - name: Zip the build (macOS) | |
| run: | | |
| ZIP_NAME="macos-arm64.zip" | |
| cd build/desktop | |
| zip -r "../../$ZIP_NAME" . | |
| shell: bash | |
| if: runner.os == 'macOS' | |
| - name: Create Release Build (Linux) | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: linux-x64.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-arm64.zip | |
| if: runner.os == 'macOS' |