name: Build on: push: branches: - master tags: - v* permissions: write-all jobs: windows: strategy: fail-fast: false matrix: arch: - x64 - ia32 - arm64 runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Nodejs uses: actions/setup-node@v4 with: node-version: 22 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: 9 - name: Install Dependencies env: npm_config_arch: ${{ matrix.arch }} npm_config_target_arch: ${{ matrix.arch }} run: | pnpm install pnpm prepare --${{ matrix.arch }} - name: Build env: npm_config_arch: ${{ matrix.arch }} npm_config_target_arch: ${{ matrix.arch }} run: pnpm build:win --${{ matrix.arch }} - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: Windows ${{ matrix.arch }} path: dist/*.exe if-no-files-found: error - name: Publish Release if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@v2 with: files: | dist/*.exe dist/latest.yml token: ${{ secrets.GITHUB_TOKEN }} linux: strategy: fail-fast: false matrix: arch: - x64 - arm64 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Nodejs uses: actions/setup-node@v4 with: node-version: 22 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: 9 - name: Install Dependencies env: npm_config_arch: ${{ matrix.arch }} npm_config_target_arch: ${{ matrix.arch }} run: | pnpm install pnpm prepare --${{ matrix.arch }} - name: Build env: npm_config_arch: ${{ matrix.arch }} npm_config_target_arch: ${{ matrix.arch }} run: pnpm build:linux --${{ matrix.arch }} - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: Linux ${{ matrix.arch }} path: | dist/*.deb dist/*.rpm if-no-files-found: error - name: Publish Release if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@v2 with: files: | dist/*.deb dist/*.rpm token: ${{ secrets.GITHUB_TOKEN }} macos: strategy: fail-fast: false matrix: arch: - x64 - arm64 runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Nodejs uses: actions/setup-node@v4 with: node-version: 22 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: 9 - name: Install Dependencies env: npm_config_arch: ${{ matrix.arch }} npm_config_target_arch: ${{ matrix.arch }} run: | pnpm install pnpm prepare --${{ matrix.arch }} - name: Build env: npm_config_arch: ${{ matrix.arch }} npm_config_target_arch: ${{ matrix.arch }} run: pnpm build:mac --${{ matrix.arch }} - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: MacOS ${{ matrix.arch }} path: dist/*.dmg if-no-files-found: error - name: Publish Release if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@v2 with: files: dist/*.dmg token: ${{ secrets.GITHUB_TOKEN }}