diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7276a2..5a967c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,24 +101,24 @@ build: - | 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 { - Write-Error "✗ Build artifact missing: update-payload.zip" + Write-Error "Build artifact missing: update-payload.zip" exit 1 } 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 { - Write-Error "✗ Manifest file missing" + Write-Error "Manifest file missing" exit 1 } if (Test-Path "validation-report.json") { - Write-Host "✓ Validation report verified" + Write-Host "Validation report verified" } - Write-Host "Packaging Electron application..." @@ -128,27 +128,23 @@ build: Write-Host "Publishing Release to GitLab..." $versionTag = "v$env:CI_PIPELINE_IID" $exeFile = (Get-ChildItem dist/*.exe | Select-Object -First 1).Name - $exeUrl = $exeFile -replace " ", "%20" $releaseBody = @{ name = "Vyla Home Release $versionTag" tag_name = "$versionTag" - description = "Automated release for build $versionTag" + description = "Automated release for build $versionTag. Download the Windows installer below." ref = "$env:CI_COMMIT_SHA" assets = @{ links = @( - @{ - name = "$exeFile" - url = "$env:CI_PROJECT_URL/-/jobs/artifacts/$env:CI_COMMIT_BRANCH/raw/dist/$exeUrl?job=build" - link_type = "package" - }, @{ name = "update-payload.zip" - url = "$env:CI_PROJECT_URL/-/jobs/artifacts/$env:CI_COMMIT_BRANCH/raw/update-payload.zip?job=build" + url = "$env:CI_PROJECT_URL/-/jobs/$env:CI_JOB_ID/artifacts/raw/update-payload.zip" + link_type = "other" }, @{ name = "manifest.json" - url = "$env:CI_PROJECT_URL/-/jobs/artifacts/$env:CI_COMMIT_BRANCH/raw/manifest.json?job=build" + url = "$env:CI_PROJECT_URL/-/jobs/$env:CI_JOB_ID/artifacts/raw/manifest.json" + link_type = "other" } ) } @@ -161,7 +157,7 @@ build: try { $createdRelease = Invoke-RestMethod -Uri "https://gitlab.com/api/v4/projects/$env:CI_PROJECT_ID/releases" -Method Post -Headers $releaseHeaders -Body $releaseBody - Write-Host "✓ Release successfully published: $($createdRelease.tag_name)" + Write-Host "Release successfully published: $($createdRelease.tag_name)" } catch { Write-Warning "Release creation failed: $($_.Exception.Message)" exit 1