From 035deb924618735e25b9fd7a3de72074836762a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B8=AD=E9=B8=AD=E3=80=8C=E3=82=AB=E3=83=A2=E3=80=8D?= <89643991+DuckDuckStudio@users.noreply.github.com> Date: Sat, 29 Aug 2026 22:33:48 +0800 Subject: [PATCH] =?UTF-8?q?ci(release):=20=E4=BD=BF=E7=94=A8=20Inno=20Setu?= =?UTF-8?q?p=207=20=E6=89=93=E5=8C=85=E5=AE=89=E8=A3=85=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yaml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e9060a5..53525a2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,7 +33,25 @@ jobs: - name: 配置 Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: 3.x + python-version: 3.14.x + + - name: 安装 Inno Setup 7 + shell: pwsh + run: |- + Write-OutPut "[INFO] 卸载 Inno Setup 6" + choco uninstall innosetup + # 这里如果用 WinGet 卸载的话后面 iscc 会变成 C:\ProgramData\Chocolatey\bin\ISCC.exe + # 然后报错: + # Cannot find file at 'c:\program files (x86)\inno setup 6\iscc.exe' (c:\program files (x86)\inno setup 6\iscc.exe). This usually indicates a missing or moved file. + + Write-OutPut "[INFO] 安装 Inno Setup 7" + winget install --id JRSoftware.InnoSetup.7 --scope machine -s winget -e + # Chocolatey 上好像没有 InnoSetup 7 + # https://community.chocolatey.org/packages?q=innosetup + + Write-OutPut "[INFO] 更新 PATH" + "C:\Program Files\Inno Setup 7\" | Out-File -FilePath "$env:GITHUB_PATH" -Append + Write-OutPut "$env:Path" - name: 更新版本号 shell: bash @@ -46,7 +64,7 @@ jobs: version="${GITHUB_REF_NAME#refs/tags/}" version="${version#v}" fi - + python ".scripts/update_version.py" "$version" - name: 发布 @@ -54,14 +72,7 @@ jobs: - name: 打包安装程序 shell: pwsh - run: |- - Write-Host "通过 GitHub API 下载中文翻译..." - $apiUrl = "https://api.github.com/repos/jrsoftware/issrc/contents/Files/Languages/ChineseSimplified.isl?ref=main" - $downloadPath = "C:\Program Files (x86)\Inno Setup 6\Languages\ChineseSimplified.isl" - Invoke-WebRequest -Uri $apiUrl -Headers @{ "Accept" = "application/vnd.github.raw+json" } -OutFile $downloadPath - Get-FileHash -Path $downloadPath -Algorithm SHA256 - - iscc installer.iss + run: iscc installer.iss - name: 上传构建文件 if: ${{ github.event_name == 'workflow_dispatch' }}