File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Release MSI
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+ types : [closed]
9+ branches :
10+ - master
11+
12+ permissions :
13+ contents : write
14+
15+ jobs :
16+ build :
17+ name : Build MSI Installer
18+ runs-on : windows-latest
19+ if : github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
20+
21+ steps :
22+ - name : Checkout Code
23+ uses : actions/checkout@v4
24+
25+ - name : Setup .NET
26+ uses : actions/setup-dotnet@v4
27+ with :
28+ dotnet-version : ' 8.0.x'
29+
30+ - name : Add msbuild to PATH
31+ uses : microsoft/setup-msbuild@v2
32+
33+ - name : Build MSI Installer
34+ shell : pwsh
35+ run : |
36+ .\Build.ps1 -Setup
37+
38+ - name : Upload MSI Artifact
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : ScriptProSetup-MSI
42+ path : Release\ScriptProSetup.msi
43+
44+ - name : Create GitHub Release
45+ uses : softprops/action-gh-release@v2
46+ if : github.event_name == 'push'
47+ with :
48+ files : Release\ScriptProSetup.msi
49+ tag_name : " v${{ github.run_number }}.0.0" # Auto-generate a version or configure it based on commit
50+ name : " Latest Master Build (${{ github.run_number }})"
51+ body : " Automated release of ScriptProPlus installer."
52+ draft : true
53+ prerelease : true
54+ env :
55+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments