|
1 | | -name: Build Release Package |
| 1 | +name: Build and Auto-Release |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | tags: |
6 | | - - 'v*' # Triggers on version tags like v1.0.0 |
7 | | - workflow_dispatch: # Also allows manual trigger |
| 6 | + - 'v*' # Triggers when you push a tag like v1.0.0 |
| 7 | + workflow_dispatch: # Also allows manual trigger from GitHub UI |
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | build: |
11 | 11 | runs-on: windows-latest |
12 | 12 |
|
13 | 13 | env: |
14 | | - DOTNET_ROOT: C:\Program Files\dotnet |
15 | 14 | Configuration: Release |
16 | 15 | OutputDir: output |
17 | 16 |
|
18 | 17 | steps: |
19 | | - - name: Checkout source |
| 18 | + - name: 🧾 Checkout Code |
20 | 19 | uses: actions/checkout@v4 |
21 | 20 |
|
22 | | - - name: Setup .NET SDK |
| 21 | + - name: 🧰 Setup .NET SDK |
23 | 22 | uses: actions/setup-dotnet@v4 |
24 | 23 | with: |
25 | 24 | dotnet-version: '6.0.x' |
26 | 25 |
|
27 | | - - name: Restore dependencies |
| 26 | + - name: 🔁 Restore Dependencies |
28 | 27 | run: dotnet restore |
29 | 28 |
|
30 | | - - name: Build in Release mode |
| 29 | + - name: 🛠️ Build Solution |
31 | 30 | run: dotnet build --configuration $env:Configuration --no-restore |
32 | 31 |
|
33 | | - - name: Publish Release Package |
| 32 | + - name: 🚀 Publish Self-Contained Executable |
34 | 33 | run: | |
35 | 34 | dotnet publish Ext4Explorer/Ext4Explorer.csproj ` |
36 | 35 | --configuration $env:Configuration ` |
37 | | - --output $env:OutputDir ` |
38 | | - --runtime win-x86 ` |
| 36 | + --runtime win-x64 ` |
39 | 37 | --self-contained true ` |
| 38 | + --output $env:OutputDir ` |
40 | 39 | /p:PublishSingleFile=true ` |
41 | | - /p:IncludeNativeLibrariesForSelfExtract=true |
| 40 | + /p:IncludeNativeLibrariesForSelfExtract=true ` |
| 41 | + /p:EnableCompressionInSingleFile=true |
42 | 42 |
|
43 | | - - name: Zip Published Output |
| 43 | + - name: 📦 Zip Published Output |
44 | 44 | run: Compress-Archive -Path $env:OutputDir\* -DestinationPath release.zip |
45 | 45 |
|
46 | | - - name: Upload Artifact |
47 | | - uses: actions/upload-artifact@v4 |
| 46 | + - name: 🚀 Create GitHub Release and Upload Artifact |
| 47 | + uses: softprops/action-gh-release@v2 |
48 | 48 | with: |
49 | | - name: ext4explorer-release |
50 | | - path: release.zip |
| 49 | + name: Release ${{ github.ref_name }} |
| 50 | + tag_name: ${{ github.ref_name }} |
| 51 | + files: release.zip |
| 52 | + env: |
| 53 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments