ci: add Windows Alpha release workflow

This commit is contained in:
reaper
2026-08-26 02:28:12 -05:00
parent d3f04015d6
commit fe3f6ce178
2 changed files with 83 additions and 1 deletions
+82
View File
@@ -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
+1 -1
View File
@@ -27,7 +27,7 @@
"module:new": "node scripts/create-module.cjs", "module:new": "node scripts/create-module.cjs",
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"build:unpack": "npm run build && electron-builder --dir", "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:mac": "npm run build && electron-builder --mac",
"build:linux": "npm run build && electron-builder --linux", "build:linux": "npm run build && electron-builder --linux",
"build:appimage": "npm run build && electron-builder --linux AppImage --publish never", "build:appimage": "npm run build && electron-builder --linux AppImage --publish never",