Use cmd shell for Windows steps; powershell is blocked by execution policy under SYSTEM
This commit is contained in:
@@ -10,22 +10,22 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos, windows, linux]
|
include:
|
||||||
|
- os: macos
|
||||||
|
shell: bash
|
||||||
|
- os: windows
|
||||||
|
shell: cmd
|
||||||
|
- os: linux
|
||||||
|
shell: bash
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
# Plain git clone instead of actions/checkout (a JS action that would
|
# Plain git clone instead of actions/checkout (a JS action that would
|
||||||
# require node on the host). Full history so setuptools_scm sees tags.
|
# require node on the host). Full history so setuptools_scm sees tags.
|
||||||
# ${{ }} expressions are substituted by the runner, so both shells work.
|
# ${{ }} expressions are substituted by the runner, so both shells work.
|
||||||
|
# Windows uses cmd: bash resolves to WSL (refuses SYSTEM accounts) and
|
||||||
|
# powershell hits the script execution policy under SYSTEM.
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
if: matrix.os != 'windows'
|
shell: ${{ matrix.shell }}
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git clone "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
|
|
||||||
git checkout -f "${{ gitea.sha }}"
|
|
||||||
|
|
||||||
- name: Checkout (Windows)
|
|
||||||
if: matrix.os == 'windows'
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
run: |
|
||||||
git clone "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
|
git clone "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
|
||||||
git checkout -f "${{ gitea.sha }}"
|
git checkout -f "${{ gitea.sha }}"
|
||||||
@@ -41,12 +41,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Node.js (Windows)
|
- name: Install Node.js (Windows)
|
||||||
if: matrix.os == 'windows'
|
if: matrix.os == 'windows'
|
||||||
shell: powershell
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
uv tool install nodejs-wheel
|
uv tool install nodejs-wheel
|
||||||
Add-Content $env:GITHUB_PATH "$env:USERPROFILE\.local\bin"
|
echo %USERPROFILE%\.local\bin>>"%GITHUB_PATH%"
|
||||||
|
|
||||||
- name: Build GUI app zip and dist packages
|
- name: Build GUI app zip and dist packages
|
||||||
|
shell: ${{ matrix.shell }}
|
||||||
run: uv run --extra gui scripts/guibuild.py
|
run: uv run --extra gui scripts/guibuild.py
|
||||||
|
|
||||||
# Every platform converges on the one release for the tag; release.py
|
# Every platform converges on the one release for the tag; release.py
|
||||||
@@ -54,12 +55,14 @@ jobs:
|
|||||||
# Only the linux job publishes the wheel/sdist (identical across platforms).
|
# Only the linux job publishes the wheel/sdist (identical across platforms).
|
||||||
- name: Create Gitea release and upload assets
|
- name: Create Gitea release and upload assets
|
||||||
if: matrix.os == 'linux'
|
if: matrix.os == 'linux'
|
||||||
|
shell: ${{ matrix.shell }}
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
run: uv run scripts/release.py
|
run: uv run scripts/release.py
|
||||||
|
|
||||||
- name: Attach platform artifact to the Gitea release
|
- name: Attach platform artifact to the Gitea release
|
||||||
if: matrix.os != 'linux'
|
if: matrix.os != 'linux'
|
||||||
|
shell: ${{ matrix.shell }}
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
run: uv run scripts/release.py --no-dist
|
run: uv run scripts/release.py --no-dist
|
||||||
|
|||||||
Reference in New Issue
Block a user