netx/.github/workflows/release-windows.yml
oliver 7e78485396 Fix Windows release CI parsing and publish Forgejo via git.avelo.top.
Use pwsh -File with UTF-8 BOM scripts, and default Forgejo uploads to the public domain when LAN IP is unreachable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 21:06:47 +08:00

48 lines
1.2 KiB
YAML

name: Release Windows
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build release stage
shell: pwsh
run: |
# Use pwsh -File (UTF-8). Nested Windows PowerShell 5.1 mis-parses UTF-8 scripts without BOM.
& ./packaging/build_release.ps1 -CreateVenv
- name: Install Inno Setup
shell: pwsh
run: |
choco install innosetup -y --no-progress
echo "C:\Program Files (x86)\Inno Setup 6" >> $env:GITHUB_PATH
- name: Compile installer
shell: pwsh
run: |
$ver = (Get-Content pyproject.toml | Select-String '^\s*version\s*=').Line -replace '.*"(.+)"','$1'
ISCC.exe "/DMyAppVersion=$ver" packaging/installer/netx.iss
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
packaging/release/NetX-Setup-*.exe
generate_release_notes: true