Skip to content

Commit b2bc52f

Browse files
committed
ci(workflow): implement automated release pipeline for version tags
- Create `release.yml` workflow triggered exclusively on `v*` tag pushes - Configure Windows runner environment with .NET 10 SDK setup - Integrate unit test execution step prior to build artifacts - Implement `dotnet publish` for SingleFile self-contained executable generation - Automate GitHub Release creation and binary upload using `softprops/action-gh-release`
1 parent f00dc7c commit b2bc52f

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags: [ "v*" ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build:
12+
runs-on: windows-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 10.0.x # Uses the version matching your csproj
21+
22+
- name: Restore dependencies
23+
run: dotnet restore
24+
25+
- name: Run Tests
26+
# We run tests before building the release to ensure quality
27+
run: dotnet test --no-restore --verbosity normal
28+
29+
- name: Publish WinHome (Single File)
30+
# This compiles the standalone .exe
31+
run: dotnet publish WinHome.csproj -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true -o ./publish
32+
33+
- name: Create Release
34+
uses: softprops/action-gh-release@v1
35+
with:
36+
files: ./publish/WinHome.exe
37+
draft: false
38+
prerelease: false
39+
generate_release_notes: true

0 commit comments

Comments
 (0)