Test. #7
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-app | |
| on: | |
| push: | |
| paths: | |
| - '.github/workflows/build-app.yml' | |
| - 'bin/**' | |
| - 'electron/**' | |
| - 'forge.config.cjs' | |
| - 'index.html' | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| - 'src/**' | |
| - 'vite.config.*' | |
| env: | |
| ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| node-version: [26] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install Dependencies | |
| run: | | |
| sudo dpkg --add-architecture i386 | |
| sudo apt update | |
| sudo apt install -y wine-stable p7zip-full rpm | |
| mkdir -p "${HOME}/.wine/drive_c/windows/system32" | |
| ln -sf $(which 7z) "${HOME}/.wine/drive_c/windows/system32/7z.exe" | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| id: pnpm-install | |
| with: | |
| run_install: false | |
| - name: Cache Electron Downloads | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./.cache/electron | |
| key: ${{ runner.os }}-electron-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-electron- | |
| - name: Install Node Dependencies | |
| run: pnpm install | |
| - name: Build Renderer | |
| run: pnpm exec vp build | |
| - name: Build Native Apps | |
| run: | | |
| pnpm run forge:make | |
| pnpm run forge:package -- --platform=linux --arch x64 | |
| pnpm run forge:make -- --platform=win32 | |
| - name: Upload Artifacts to GitHub | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| if-no-files-found: error | |
| name: native-apps | |
| path: | | |
| ./out/make | |
| ./out/codiff-linux-x64 |