add direct exe download link to release assets

This commit is contained in:
2026-08-14 21:30:29 -07:00
parent 1bf7a1b34d
commit bbfa5f33fe

View File

@@ -39,12 +39,21 @@ build:
AUTH_PROXY_DEV_BYPASS_AUTH: $DEV_BYPASS_AUTH
AUTH_PROXY_PROXY_VITE_API_KEY: $PROXY_VITE_API_KEY
GIT_TERMINAL_PROMPT: "0"
ELECTRON_CACHE: "$CI_PROJECT_DIR/.electron-cache"
npm_config_cache: "$CI_PROJECT_DIR/.npm"
cache:
key:
files:
- package-lock.json
key: "vyla-home-cache-v1"
paths:
- node_modules/
- .npm/
- .electron-cache/
- last-shas.json
before_script:
- git config --global credential.helper ""
- npm config set loglevel error
script:
- npm ci
@@ -102,8 +111,6 @@ build:
- |
if (Test-Path "update-payload.zip") {
Write-Host "Build artifact verified: update-payload.zip exists"
$size = (Get-Item update-payload.zip).Length
Write-Host " Size: $size bytes"
} else {
Write-Error "Build artifact missing: update-payload.zip"
exit 1
@@ -111,23 +118,20 @@ build:
if (Test-Path "manifest.json") {
Write-Host "Manifest file verified"
Get-Content manifest.json | ConvertFrom-Json | ConvertTo-Json -Depth 10
} else {
Write-Error "Manifest file missing"
exit 1
}
if (Test-Path "validation-report.json") {
Write-Host "Validation report verified"
}
- Write-Host "Packaging Electron application..."
- npm run dist
- |
Write-Host "Publishing Release to GitLab..."
$versionTag = "v$env:CI_PIPELINE_IID"
$exeFile = (Get-ChildItem dist/*.exe | Select-Object -First 1).Name
$exeItem = Get-ChildItem dist/*.exe | Select-Object -First 1
$exeName = $exeItem.Name
$exeEncoded = [System.Uri]::EscapeDataString($exeName)
$releaseBody = @{
name = "Vyla Home Release $versionTag"
@@ -136,6 +140,11 @@ build:
ref = "$env:CI_COMMIT_SHA"
assets = @{
links = @(
@{
name = "$exeName"
url = "$env:CI_PROJECT_URL/-/jobs/$env:CI_JOB_ID/artifacts/raw/dist/$exeEncoded"
link_type = "package"
},
@{
name = "update-payload.zip"
url = "$env:CI_PROJECT_URL/-/jobs/$env:CI_JOB_ID/artifacts/raw/update-payload.zip"