From fe3f6ce178dc43f5f19eebfd2c753f2c21d15528 Mon Sep 17 00:00:00 2001 From: reaper Date: Wed, 26 Aug 2026 02:28:12 -0500 Subject: [PATCH] ci: add Windows Alpha release workflow --- .github/workflows/windows-release.yml | 82 +++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/windows-release.yml diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml new file mode 100644 index 0000000..14254ad --- /dev/null +++ b/.github/workflows/windows-release.yml @@ -0,0 +1,82 @@ +name: Windows release + +on: + workflow_dispatch: + inputs: + release_tag: + description: Existing GitHub release tag to receive the Windows installer + required: true + default: v2.0.0-alpha.28 + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + build-windows: + runs-on: windows-2025 + timeout-minutes: 45 + + steps: + - name: Check out source + uses: actions/checkout@v5 + + - name: Set up Node.js + uses: actions/setup-node@v5 + with: + node-version: 22 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Verify source + run: | + npm run typecheck + npm run test:run + + - name: Read application version + shell: pwsh + run: | + $version = node -p "require('./package.json').version" + "APP_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Build Windows installer + env: + CSC_IDENTITY_AUTO_DISCOVERY: 'false' + run: npm run build:win + + - name: Verify installer and create checksum + shell: pwsh + run: | + $installer = "dist/aurora-dockside-$env:APP_VERSION-setup.exe" + if (-not (Test-Path $installer)) { throw "Missing Windows installer: $installer" } + $hash = (Get-FileHash -Algorithm SHA256 $installer).Hash.ToLowerInvariant() + "$hash $(Split-Path $installer -Leaf)" | Set-Content dist/SHA256SUMS-windows.txt + Get-Content dist/SHA256SUMS-windows.txt + + - name: Upload Windows release bundle + uses: actions/upload-artifact@v5 + with: + name: aurora-dockside-windows-x64 + if-no-files-found: error + retention-days: 14 + path: | + dist/*-setup.exe + dist/latest.yml + dist/SHA256SUMS-windows.txt + dist/module-catalog/*.pac + + - name: Publish Windows assets + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' + shell: pwsh + env: + GH_TOKEN: ${{ github.token }} + RELEASE_TAG: ${{ github.event.inputs.release_tag || github.ref_name }} + run: | + gh release upload "$env:RELEASE_TAG" ` + "dist/aurora-dockside-$env:APP_VERSION-setup.exe" ` + "dist/SHA256SUMS-windows.txt" ` + --clobber diff --git a/package.json b/package.json index 57361ae..082d778 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "module:new": "node scripts/create-module.cjs", "postinstall": "electron-builder install-app-deps", "build:unpack": "npm run build && electron-builder --dir", - "build:win": "npm run build && electron-builder --win", + "build:win": "npm run build && electron-builder --win --publish never", "build:mac": "npm run build && electron-builder --mac", "build:linux": "npm run build && electron-builder --linux", "build:appimage": "npm run build && electron-builder --linux AppImage --publish never",