mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-16 15:17:21 -05:00
add direct exe download link to release assets
This commit is contained in:
@@ -39,12 +39,21 @@ build:
|
|||||||
AUTH_PROXY_DEV_BYPASS_AUTH: $DEV_BYPASS_AUTH
|
AUTH_PROXY_DEV_BYPASS_AUTH: $DEV_BYPASS_AUTH
|
||||||
AUTH_PROXY_PROXY_VITE_API_KEY: $PROXY_VITE_API_KEY
|
AUTH_PROXY_PROXY_VITE_API_KEY: $PROXY_VITE_API_KEY
|
||||||
GIT_TERMINAL_PROMPT: "0"
|
GIT_TERMINAL_PROMPT: "0"
|
||||||
|
|
||||||
|
ELECTRON_CACHE: "$CI_PROJECT_DIR/.electron-cache"
|
||||||
|
npm_config_cache: "$CI_PROJECT_DIR/.npm"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
key:
|
key: "vyla-home-cache-v1"
|
||||||
files:
|
|
||||||
- package-lock.json
|
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- .npm/
|
||||||
|
- .electron-cache/
|
||||||
|
- last-shas.json
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- git config --global credential.helper ""
|
||||||
|
- npm config set loglevel error
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- npm ci
|
- npm ci
|
||||||
|
|
||||||
@@ -102,8 +111,6 @@ build:
|
|||||||
- |
|
- |
|
||||||
if (Test-Path "update-payload.zip") {
|
if (Test-Path "update-payload.zip") {
|
||||||
Write-Host "Build artifact verified: update-payload.zip exists"
|
Write-Host "Build artifact verified: update-payload.zip exists"
|
||||||
$size = (Get-Item update-payload.zip).Length
|
|
||||||
Write-Host " Size: $size bytes"
|
|
||||||
} else {
|
} else {
|
||||||
Write-Error "Build artifact missing: update-payload.zip"
|
Write-Error "Build artifact missing: update-payload.zip"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -111,23 +118,20 @@ build:
|
|||||||
|
|
||||||
if (Test-Path "manifest.json") {
|
if (Test-Path "manifest.json") {
|
||||||
Write-Host "Manifest file verified"
|
Write-Host "Manifest file verified"
|
||||||
Get-Content manifest.json | ConvertFrom-Json | ConvertTo-Json -Depth 10
|
|
||||||
} else {
|
} else {
|
||||||
Write-Error "Manifest file missing"
|
Write-Error "Manifest file missing"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Test-Path "validation-report.json") {
|
|
||||||
Write-Host "Validation report verified"
|
|
||||||
}
|
|
||||||
|
|
||||||
- Write-Host "Packaging Electron application..."
|
- Write-Host "Packaging Electron application..."
|
||||||
- npm run dist
|
- npm run dist
|
||||||
|
|
||||||
- |
|
- |
|
||||||
Write-Host "Publishing Release to GitLab..."
|
Write-Host "Publishing Release to GitLab..."
|
||||||
$versionTag = "v$env:CI_PIPELINE_IID"
|
$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 = @{
|
$releaseBody = @{
|
||||||
name = "Vyla Home Release $versionTag"
|
name = "Vyla Home Release $versionTag"
|
||||||
@@ -136,6 +140,11 @@ build:
|
|||||||
ref = "$env:CI_COMMIT_SHA"
|
ref = "$env:CI_COMMIT_SHA"
|
||||||
assets = @{
|
assets = @{
|
||||||
links = @(
|
links = @(
|
||||||
|
@{
|
||||||
|
name = "$exeName"
|
||||||
|
url = "$env:CI_PROJECT_URL/-/jobs/$env:CI_JOB_ID/artifacts/raw/dist/$exeEncoded"
|
||||||
|
link_type = "package"
|
||||||
|
},
|
||||||
@{
|
@{
|
||||||
name = "update-payload.zip"
|
name = "update-payload.zip"
|
||||||
url = "$env:CI_PROJECT_URL/-/jobs/$env:CI_JOB_ID/artifacts/raw/update-payload.zip"
|
url = "$env:CI_PROJECT_URL/-/jobs/$env:CI_JOB_ID/artifacts/raw/update-payload.zip"
|
||||||
|
|||||||
Reference in New Issue
Block a user