ci: add Windows Alpha release workflow
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user