Build EnvHelper desktop app
Some checks failed
Build Windows App / build-windows (push) Has been cancelled

This commit is contained in:
MrSphay
2026-05-01 12:54:29 +02:00
commit 0d4c6e9c82
15 changed files with 978 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
name: Build Windows App
on:
push:
branches:
- main
- master
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm install
- name: Build Windows installer
run: npm run dist:win
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: envhelper-windows
path: release/*
- name: Publish to Gitea package registry
shell: pwsh
run: |
$package = Get-Content package.json | ConvertFrom-Json
$shortSha = $env:GITHUB_SHA.Substring(0, 7)
$packageVersion = "$($package.version)-$shortSha"
$headers = @{ Authorization = "token $env:REGISTRY_TOKEN" }
Get-ChildItem release -File | ForEach-Object {
$fileName = [System.Uri]::EscapeDataString($_.Name)
$uri = "https://git.wilkensxl.de/api/packages/MrSphay/generic/envhelper/$packageVersion/$fileName"
Invoke-RestMethod -Method Put -Uri $uri -Headers $headers -InFile $_.FullName -ContentType "application/octet-stream"
}