Files
jiu/.gitea/workflows/build-windows.yml
T
wangjia cf468f51cf
Build Windows Only / build-windows (push) Failing after 15s
ci(devops): Windows runner 将 shell 钉到 Git for Windows 自带 bash 绝对路径
Git 安装包默认只把 git.exe 加入 PATH(Git\cmd),不含 bash.exe(Git\bin),
导致 act_runner 解析 `shell: bash` 时报「Cannot find: bash in PATH」。
改用 GitHub Actions 官方等价写法,绕过 PATH 查找:
  C:\Program Files\Git\bin\bash.exe --noprofile --norc -eo pipefail {0}
(bin\bash.exe 包装器会注入 /usr/bin,使脚本内 sh/powershell 可解析)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 23:42:06 +08:00

43 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build Windows Only
# 仅构建 Windows 桌面版(不触发完整 deploy)。
# 触发方式:
# - 手动 workflow_dispatch(可填 ver
# - 推送 winbuild* 轻量 tag(如 winbuild1),不与 deploy.yml 的 v* tag 冲突
on:
workflow_dispatch:
inputs:
ver:
description: '版本号 (如 v1.0.4)'
required: false
default: 'v1.0.4'
type: string
push:
tags:
- 'winbuild*'
jobs:
build-windows:
runs-on: windows
env:
GOPROXY: https://goproxy.cn,direct
PUB_HOSTED_URL: https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn
steps:
- uses: actions/checkout@v4
- name: Provision (idempotent — auto-runs if host not initialized)
shell: 'C:\Program Files\Git\bin\bash.exe --noprofile --norc -eo pipefail {0}'
run: sh scripts/ci/provision-windows.sh
- name: Compile (Flutter Windows)
shell: 'C:\Program Files\Git\bin\bash.exe --noprofile --norc -eo pipefail {0}'
run: sh scripts/ci/compile-windows.sh "${{ inputs.ver || 'v1.0.4' }}"
- name: Upload windows artifact
uses: actions/upload-artifact@v3
with:
name: jiu-windows
path: dist/