Use available Gitea runner for Windows build
Some checks failed
Build Windows App / build-windows (push) Failing after 6m7s

This commit is contained in:
MrSphay
2026-05-01 13:07:31 +02:00
parent 0d4c6e9c82
commit 3184b39d5c

View File

@@ -9,7 +9,7 @@ on:
jobs: jobs:
build-windows: build-windows:
runs-on: windows-latest runs-on: ubuntu-latest
env: env:
GH_TOKEN: ${{ secrets.REGISTRY_TOKEN }} GH_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.REGISTRY_TOKEN }} GITHUB_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
@@ -24,6 +24,18 @@ jobs:
node-version: 22 node-version: 22
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
- name: Install Windows build dependencies
run: |
if command -v sudo >/dev/null 2>&1; then
SUDO=sudo
else
SUDO=
fi
$SUDO dpkg --add-architecture i386
$SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends wine64 wine32
- name: Install dependencies - name: Install dependencies
run: npm install run: npm install
@@ -37,15 +49,15 @@ jobs:
path: release/* path: release/*
- name: Publish to Gitea package registry - name: Publish to Gitea package registry
shell: pwsh shell: bash
run: | run: |
$package = Get-Content package.json | ConvertFrom-Json package_version="$(node -p "require('./package.json').version")-${GITHUB_SHA::7}"
$shortSha = $env:GITHUB_SHA.Substring(0, 7)
$packageVersion = "$($package.version)-$shortSha"
$headers = @{ Authorization = "token $env:REGISTRY_TOKEN" }
Get-ChildItem release -File | ForEach-Object { for artifact in release/*; do
$fileName = [System.Uri]::EscapeDataString($_.Name) [ -f "$artifact" ] || continue
$uri = "https://git.wilkensxl.de/api/packages/MrSphay/generic/envhelper/$packageVersion/$fileName" file_name="$(basename "$artifact")"
Invoke-RestMethod -Method Put -Uri $uri -Headers $headers -InFile $_.FullName -ContentType "application/octet-stream" curl --fail-with-body \
} --user "MrSphay:${REGISTRY_TOKEN}" \
--upload-file "$artifact" \
"https://git.wilkensxl.de/api/packages/MrSphay/generic/envhelper/${package_version}/${file_name}"
done