From 3ae4ce9f9f342ce30ad2d14bec62fa8c129bcadb Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 22 Sep 2026 04:23:48 +0000 Subject: [PATCH] Fix Windows checkout (powershell, not WSL bash) and install node per-job via uv --- .gitea/workflows/release.yaml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index e002da9..aa1f547 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -15,11 +15,36 @@ jobs: steps: # Plain git clone instead of actions/checkout (a JS action that would # require node on the host). Full history so setuptools_scm sees tags. + # ${{ }} expressions are substituted by the runner, so both shells work. - name: Checkout + if: matrix.os != 'windows' shell: bash run: | - git clone "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" . - git checkout -f "$GITHUB_SHA" + git clone "${{ gitea.server_url }}/${{ gitea.repository }}.git" . + git checkout -f "${{ gitea.sha }}" + + - name: Checkout (Windows) + if: matrix.os == 'windows' + shell: powershell + run: | + git clone "${{ gitea.server_url }}/${{ gitea.repository }}.git" . + git checkout -f "${{ gitea.sha }}" + + # The sdist build compiles the Vue frontend and needs node/npm. + # Install per-job via uv so runner hosts don't need node set up. + - name: Install Node.js + if: matrix.os != 'windows' + shell: bash + run: | + uv tool install nodejs-wheel + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + + - name: Install Node.js (Windows) + if: matrix.os == 'windows' + shell: powershell + run: | + uv tool install nodejs-wheel + Add-Content $env:GITHUB_PATH "$env:USERPROFILE\.local\bin" - name: Build GUI app zip and dist packages run: uv run --extra gui scripts/guibuild.py @@ -33,7 +58,7 @@ jobs: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} run: uv run scripts/release.py - - name: Attach platform zip to the Gitea release + - name: Attach platform artifact to the Gitea release if: matrix.os != 'linux' env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}