From f490cf50eff04e6b51bab7e50d46711d06ca142d Mon Sep 17 00:00:00 2001 From: dichfr <63906476+dichfrr@users.noreply.github.com> Date: Fri, 27 Nov 2026 13:03:26 +0330 Subject: [PATCH 1/2] ci: add Bipelc Windows preview release workflow --- .github/workflows/bipelc-windows-preview.yml | 90 ++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/bipelc-windows-preview.yml diff --git a/.github/workflows/bipelc-windows-preview.yml b/.github/workflows/bipelc-windows-preview.yml new file mode 100644 index 000000000..d342311ab --- /dev/null +++ b/.github/workflows/bipelc-windows-preview.yml @@ -0,0 +1,90 @@ +name: Bipelc Windows Preview + +on: + push: + branches: + - bipelc/iran-cafe-foundation + +permissions: + contents: write + +concurrency: + group: bipelc-windows-preview + cancel-in-progress: false + +jobs: + build-and-release: + name: Build Windows installer and publish preview + runs-on: windows-latest + timeout-minutes: 60 + steps: + - name: Check out source + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up Node.js + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: '22.12.0' + cache: npm + cache-dependency-path: | + package-lock.json + frontend/package-lock.json + + - name: Install dependencies + run: npm ci + env: + CSC_IDENTITY_AUTO_DISCOVERY: false + + - name: Build desktop frontend + run: npm run build:frontend + env: + NEXT_TELEMETRY_DISABLED: 1 + + - name: Compile Electron main process + run: npm run build + + - name: Package Windows NSIS installer + run: npx electron-builder --win nsis --x64 --publish never + env: + CSC_IDENTITY_AUTO_DISCOVERY: false + + - name: Verify installer exists + id: installer + shell: pwsh + run: | + $installer = Get-ChildItem -Path release -Filter '*.exe' -File | Select-Object -First 1 + if (-not $installer) { + throw 'Windows installer was not produced.' + } + $hash = (Get-FileHash -Path $installer.FullName -Algorithm SHA256).Hash.ToLower() + "path=$($installer.FullName)" >> $env:GITHUB_OUTPUT + "name=$($installer.Name)" >> $env:GITHUB_OUTPUT + "sha256=$hash" >> $env:GITHUB_OUTPUT + "SHA256 ($($installer.Name)) $hash" | Out-File -FilePath release/SHA256SUMS.txt -Encoding utf8 + + - name: Publish GitHub preview release + env: + GH_TOKEN: ${{ github.token }} + INSTALLER_PATH: ${{ steps.installer.outputs.path }} + INSTALLER_NAME: ${{ steps.installer.outputs.name }} + INSTALLER_SHA256: ${{ steps.installer.outputs.sha256 }} + shell: bash + run: | + VERSION=$(node -p "require('./package.json').version") + TAG="bipelc-v${VERSION}-preview.1" + NOTES=$(mktemp) + { + echo "Windows desktop preview build for Bipelc." + echo + echo "- Installer: ${INSTALLER_NAME}" + echo "- SHA-256: ${INSTALLER_SHA256}" + echo "- Built from commit: ${GITHUB_SHA}" + echo + echo "This is an upstream FloCafe-based preview, not yet a customized production release for the Bipelc café. Review and test it before using it with real sales or customer data." + } > "$NOTES" + gh release create "$TAG" "$INSTALLER_PATH" release/SHA256SUMS.txt \ + --repo "$GITHUB_REPOSITORY" \ + --title "Bipelc Windows Preview ${VERSION}" \ + --notes-file "$NOTES" \ + --prerelease \ + --target "$GITHUB_SHA" From 2af6a392942c1a1584c2c6b7e42cc1514f814009 Mon Sep 17 00:00:00 2001 From: dichfr <63906476+dichfrr@users.noreply.github.com> Date: Fri, 27 Nov 2026 13:04:52 +0330 Subject: [PATCH 2/2] ci: use Node.js version required by dependencies --- .github/workflows/bipelc-windows-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bipelc-windows-preview.yml b/.github/workflows/bipelc-windows-preview.yml index d342311ab..4a3abcade 100644 --- a/.github/workflows/bipelc-windows-preview.yml +++ b/.github/workflows/bipelc-windows-preview.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: '22.12.0' + node-version: '22.22.1' cache: npm cache-dependency-path: | package-lock.json