Skip to content

Commit e3d20ee

Browse files
authored
Update dotnet-desktop.yml
1 parent 7496257 commit e3d20ee

1 file changed

Lines changed: 14 additions & 33 deletions

File tree

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,33 @@
1-
name: Build and Release Ext4Explorer
1+
name: Build Verification
22

33
on:
44
push:
5-
tags:
6-
- 'v*' # Trigger on tags like v1.0.0, v2.0.1 etc.
7-
workflow_dispatch:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
88

99
jobs:
1010
build:
1111
runs-on: windows-latest
1212

1313
env:
1414
Configuration: Release
15-
Runtime: win-x64
16-
ProjectPath: Ext4Explorer/Ext4Explorer.csproj
17-
OutputDir: publish
15+
ProjectPath: Ext4Explorer.sln
1816

1917
steps:
20-
- name: 📥 Checkout code
18+
- name: Checkout code
2119
uses: actions/checkout@v4
2220

23-
- name: 🧰 Setup .NET SDK
21+
- name: Setup .NET SDK
2422
uses: actions/setup-dotnet@v4
2523
with:
26-
dotnet-version: '6.0.x' # or 8.0.x if you're using .NET 8
24+
dotnet-version: '6.0.x' # or '8.0.x' as needed
2725

28-
- name: 🔁 Restore
26+
- name: Restore dependencies
2927
run: dotnet restore $env:ProjectPath
3028

31-
- name: 🏗️ Build & Publish Self-contained
32-
run: |
33-
dotnet publish $env:ProjectPath `
34-
--configuration $env:Configuration `
35-
--runtime $env:Runtime `
36-
--self-contained true `
37-
--output $env:OutputDir `
38-
/p:PublishSingleFile=true `
39-
/p:IncludeNativeLibrariesForSelfExtract=true `
40-
/p:EnableCompressionInSingleFile=true
41-
42-
- name: 📦 Create ZIP package
43-
run: Compress-Archive -Path "$env:OutputDir\*" -DestinationPath "Ext4Explorer-${{ github.ref_name }}.zip"
44-
45-
- name: 🚀 Upload ZIP to GitHub Release
46-
uses: softprops/action-gh-release@v2
47-
with:
48-
tag_name: ${{ github.ref_name }}
49-
name: Release ${{ github.ref_name }}
50-
files: Ext4Explorer-${{ github.ref_name }}.zip
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
- name: Build solution
30+
run: dotnet build $env:ProjectPath --configuration $env:Configuration --no-restore
31+
32+
- name: Run tests
33+
run: dotnet test $env:ProjectPath --configuration $env:Configuration --no-build --verbosity normal

0 commit comments

Comments
 (0)