Use available Gitea runner for Windows build
Some checks failed
Build Windows App / build-windows (push) Failing after 6m7s
Some checks failed
Build Windows App / build-windows (push) Failing after 6m7s
This commit is contained in:
@@ -9,7 +9,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
@@ -24,6 +24,18 @@ jobs:
|
||||
node-version: 22
|
||||
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
|
||||
run: npm install
|
||||
|
||||
@@ -37,15 +49,15 @@ jobs:
|
||||
path: release/*
|
||||
|
||||
- name: Publish to Gitea package registry
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
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" }
|
||||
package_version="$(node -p "require('./package.json').version")-${GITHUB_SHA::7}"
|
||||
|
||||
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"
|
||||
}
|
||||
for artifact in release/*; do
|
||||
[ -f "$artifact" ] || continue
|
||||
file_name="$(basename "$artifact")"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user