diff --git a/.github/workflows/build-and-upload.yml b/.github/workflows/build-and-upload.yml index e170b7bd..b73769d8 100644 --- a/.github/workflows/build-and-upload.yml +++ b/.github/workflows/build-and-upload.yml @@ -269,6 +269,68 @@ jobs: gh release upload "$TAG" "$file" --clobber done + build-tauri-windows: + runs-on: windows-2025 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ inputs.version }} + TAG: ${{ inputs.tag }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: npm + + - name: Setup Rust (Tauri) + uses: dtolnay/rust-toolchain@stable + + - name: Install cargo-binstall + run: curl -L https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1 | pwsh -Command - + shell: pwsh + + - name: Install tauri-cli + run: cargo binstall tauri-cli --version 2.0.0-beta.20 --no-confirm --target x86_64-pc-windows-msvc + shell: bash + + - name: Set workspace versions + run: npm version ${{ env.VERSION }} --workspaces --include-workspace-root --no-git-tag-version --allow-same-version + shell: bash + + - name: Install dependencies + run: npm ci --workspaces + + - name: Ensure rollup native binary + run: npm install @rollup/rollup-win32-x64-msvc --no-save + + - name: Build Windows bundle (Tauri) + run: npm run build --workspace @codenomad/tauri-app + + - name: Package Tauri artifacts (Windows) + shell: pwsh + run: | + $bundleRoot = "packages/tauri-app/target/release/bundle" + $artifactDir = "packages/tauri-app/release-tauri" + if (Test-Path $artifactDir) { Remove-Item $artifactDir -Recurse -Force } + New-Item -ItemType Directory -Path $artifactDir | Out-Null + Get-ChildItem -Path $bundleRoot -Recurse -File | Where-Object { $_.Extension -in '.exe', '.msi' } | ForEach-Object { + $ext = $_.Extension.TrimStart('.') + $dest = Join-Path $artifactDir ("CodeNomad-Tauri-$env:VERSION-windows-x64.$ext") + Copy-Item $_.FullName $dest -Force + } + + - name: Upload Tauri release assets (Windows) + shell: pwsh + run: | + if (Test-Path "packages/tauri-app/release-tauri") { + Get-ChildItem -Path "packages/tauri-app/release-tauri" -File | ForEach-Object { + gh release upload $env:TAG $_.FullName --clobber + } + } + build-tauri-linux: runs-on: ubuntu-24.04 env: @@ -335,7 +397,7 @@ jobs: done build-tauri-linux-arm64: - runs-on: ubuntu-22.04-arm64 + runs-on: ubuntu-24.04-arm64 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: ${{ inputs.version }}