forked from Viruaithal/ScriptPro
-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (46 loc) · 1.38 KB
/
build-msi.yml
File metadata and controls
55 lines (46 loc) · 1.38 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 MSI
on:
push:
branches:
- master
pull_request:
types: [closed]
branches:
- master
permissions:
contents: write
jobs:
build:
name: Build MSI Installer
runs-on: windows-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build MSI Installer
shell: pwsh
run: |
.\Build.ps1 -Setup
- name: Upload MSI Artifact
uses: actions/upload-artifact@v4
with:
name: ScriptProSetup-MSI
path: Release\ScriptProSetup.msi
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: github.event_name == 'push'
with:
files: Release\ScriptProSetup.msi
tag_name: "v${{ github.run_number }}.0.0" # Auto-generate a version or configure it based on commit
name: "${{ github.event.head_commit.message }}"
body: "Automated build from commit ${{ github.sha }}"
draft: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}