Skip to content

Commit d77ba63

Browse files
committed
Trim release package contents
1 parent e952ba7 commit d77ba63

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,19 @@ jobs:
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

README.en.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ After building, start:
4343
```text
4444
NetStatusSharp\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.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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` 文件只包含运行应用所需的核心文件。

0 commit comments

Comments
 (0)