-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 1.51 KB
/
Copy pathbuild-release.yml
File metadata and controls
55 lines (46 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build and Release Self-Contained
on:
push:
tags:
- 'v*' # Triggers on version tags like v1.0.0
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
env:
Configuration: Release
OutputDir: release
Runtime: win-x86
ProjectPath: Sharp4Explorer/SharpExt4Explorer.csproj
steps:
- name: 🧾 Checkout code
uses: actions/checkout@v4
- name: 🧰 Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: 🔁 Restore dependencies
run: dotnet restore $env:ProjectPath
shell: pwsh
- name: 🛠️ Build and Publish (Self-Contained x86)
run: |
dotnet publish $env:ProjectPath `
--configuration $env:Configuration `
--runtime $env:Runtime `
--self-contained true `
--output $env:OutputDir `
/p:PublishSingleFile=false `
/p:IncludeNativeLibrariesForSelfExtract=true `
/p:EnableCompressionInSingleFile=false
shell: pwsh
- name: 📦 Zip Release Output
run: Compress-Archive -Path "$env:OutputDir\*" -DestinationPath SharpExt4Explorer.zip
shell: pwsh
- name: 🚀 Create GitHub Release and Upload Artifact
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: SharpExt4Explorer.zip
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}