|
10 | 10 | # Automated nightly builds at midnight |
11 | 11 | schedule: |
12 | 12 | - cron: "0 0 * * *" |
| 13 | + # Manual trigger for testing purposes |
| 14 | + workflow_dispatch: |
13 | 15 |
|
14 | 16 | permissions: |
15 | 17 | contents: write |
@@ -91,16 +93,24 @@ jobs: |
91 | 93 | $MsiBase = $NextSemver.Split("-")[0] # Remove prerelease segment |
92 | 94 | $MsiVersion = "$MsiBase.$commit_count_mod" |
93 | 95 |
|
94 | | - # Format the release name |
95 | | - $ReleaseName = "WAU $NextSemver [Nightly Build]" |
| 96 | + # Format the release name based on trigger type |
| 97 | + if ("${{ github.event_name }}" -eq "workflow_dispatch") { |
| 98 | + $ReleaseName = "WAU $NextSemver [Pre-release Build]" |
| 99 | + $ReleaseBodyIntro = "This is a **pre-release build** created from the latest changes in the develop branch." |
| 100 | + } else { |
| 101 | + $ReleaseName = "WAU $NextSemver [Nightly Build]" |
| 102 | + $ReleaseBodyIntro = "This is an **automated nightly build** created from the latest changes in the develop branch." |
| 103 | + } |
96 | 104 |
|
97 | 105 | # Output all version information |
98 | 106 | echo "MSI version: $MsiVersion" |
99 | 107 | echo "Semver created: $NextSemver" |
100 | 108 | echo "Release name: $ReleaseName" |
| 109 | + echo "Release body intro: $ReleaseBodyIntro" |
101 | 110 | echo "MsiVersion=$MsiVersion" >> $env:GITHUB_OUTPUT |
102 | 111 | echo "NextSemVer=$NextSemver" >> $env:GITHUB_OUTPUT |
103 | 112 | echo "ReleaseName=$ReleaseName" >> $env:GITHUB_OUTPUT |
| 113 | + echo "ReleaseBodyIntro=$ReleaseBodyIntro" >> $env:GITHUB_OUTPUT |
104 | 114 |
|
105 | 115 | # Step 5: Build the project and generate artifacts |
106 | 116 | - name: Build project |
@@ -165,7 +175,7 @@ jobs: |
165 | 175 | name: ${{ steps.format_version.outputs.ReleaseName }} |
166 | 176 | artifacts: "WAU.msi,WAU_ADMX.zip,WAU_InstallCounter" |
167 | 177 | body: | |
168 | | - This is an **automated nightly build** created from the latest changes in the develop branch. |
| 178 | + ${{ steps.format_version.outputs.ReleaseBodyIntro }} |
169 | 179 |
|
170 | 180 | ⚠️ **Warning**: This build may contain unstable features and is intended for testing purposes only. |
171 | 181 |
|
|
0 commit comments