From dde14f37146d479574ee6391ee4e8b4b61d50b79 Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 15 Feb 2026 16:37:42 +0300 Subject: [PATCH] ci(release): bootstrap node before js-based actions --- .gitea/workflows/release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 88be585..4d79203 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -10,6 +10,27 @@ jobs: runs-on: windows steps: + - name: Ensure Node.js for Gitea actions + shell: powershell + run: | + if (Get-Command node -ErrorAction SilentlyContinue) { + node --version + exit 0 + } + $nodeVersion = "v20.19.0" + $zipUrl = "https://nodejs.org/dist/$nodeVersion/node-$nodeVersion-win-x64.zip" + $zipPath = "$env:RUNNER_TEMP\node.zip" + $extractRoot = "$env:RUNNER_TEMP\node" + Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath + Expand-Archive -Path $zipPath -DestinationPath $extractRoot -Force + $nodeDir = Get-ChildItem -Path $extractRoot -Directory | Select-Object -First 1 + if (-not $nodeDir) { + throw "Node.js archive extracted incorrectly." + } + $nodeDir.FullName | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + $env:PATH = "$($nodeDir.FullName);$env:PATH" + node --version + - name: Checkout uses: https://git.daemonlord.ru/actions/checkout@v4 with: