File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 $tag = "${{ github.ref_name }}"
3535 $staging = Join-Path $env:RUNNER_TEMP "NetStatusSharp-$tag"
3636 $asset = Join-Path $env:RUNNER_TEMP "NetStatusSharp-$tag.zip"
37+ $releaseDir = "NetStatusSharp\bin\Release"
38+ $filesToInclude = @(
39+ "NetStatusSharp.exe",
40+ "NetStatusSharp.exe.config",
41+ "NetStatusSharp.exe.manifest",
42+ "NetStatusAPI.dll"
43+ )
3744
3845 New-Item -ItemType Directory -Force -Path $staging | Out-Null
39- Copy-Item -Path "NetStatusSharp\bin\Release\*" -Destination $staging -Recurse -Force
46+
47+ foreach ($file in $filesToInclude) {
48+ Copy-Item -Path (Join-Path $releaseDir $file) -Destination $staging -Force
49+ }
4050
4151 if (Test-Path $asset) {
4252 Remove-Item -LiteralPath $asset -Force
Original file line number Diff line number Diff line change @@ -43,3 +43,9 @@ After building, start:
4343``` text
4444NetStatusSharp\bin\Release\NetStatusSharp.exe
4545```
46+
47+ ## GitHub Actions
48+
49+ - Pushes to ` main ` and pull requests trigger an automatic build.
50+ - Pushing a tag such as ` v1.0.0 ` triggers an automatic GitHub Release build.
51+ - The release ` zip ` includes only the core runtime files required to launch the app.
Original file line number Diff line number Diff line change @@ -53,3 +53,8 @@ NetStatusSharp\bin\Release\NetStatusSharp.exe
5353- 协议
5454- TCP 状态
5555
56+ ## GitHub Actions
57+
58+ - 推送到 ` main ` 或提交 Pull Request 时,会自动执行编译检查。
59+ - 推送形如 ` v1.0.0 ` 的标签时,会自动编译并发布 GitHub Release。
60+ - Release 附带的 ` zip ` 文件只包含运行应用所需的核心文件。
You can’t perform that action at this time.
0 commit comments