1010 # Automated nightly builds at midnight
1111 schedule :
1212 - cron : " 0 0 * * *"
13+ # Manual trigger for testing purposes
14+ workflow_dispatch :
1315
1416permissions :
1517 contents : write
@@ -91,16 +93,24 @@ jobs:
9193 $MsiBase = $NextSemver.Split("-")[0] # Remove prerelease segment
9294 $MsiVersion = "$MsiBase.$commit_count_mod"
9395
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+ }
96104
97105 # Output all version information
98106 echo "MSI version: $MsiVersion"
99107 echo "Semver created: $NextSemver"
100108 echo "Release name: $ReleaseName"
109+ echo "Release body intro: $ReleaseBodyIntro"
101110 echo "MsiVersion=$MsiVersion" >> $env:GITHUB_OUTPUT
102111 echo "NextSemVer=$NextSemver" >> $env:GITHUB_OUTPUT
103112 echo "ReleaseName=$ReleaseName" >> $env:GITHUB_OUTPUT
113+ echo "ReleaseBodyIntro=$ReleaseBodyIntro" >> $env:GITHUB_OUTPUT
104114
105115 # Step 5: Build the project and generate artifacts
106116 - name : Build project
@@ -155,7 +165,7 @@ jobs:
155165
156166 # Step 6: Create GitHub release with all artifacts
157167 - name : Create release
158- uses : ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16 .0
168+ uses : ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af # v1.18 .0
159169 if : steps.check_prs.outputs.BUILD_NEEDED == 'true'
160170 with :
161171 tag : v${{ steps.format_version.outputs.NextSemVer }}
@@ -165,7 +175,7 @@ jobs:
165175 name : ${{ steps.format_version.outputs.ReleaseName }}
166176 artifacts : " WAU.msi,WAU_ADMX.zip,WAU_InstallCounter"
167177 body : |
168- This is an **automated nightly build** created from the latest changes in the develop branch.
178+ ${{ steps.format_version.outputs.ReleaseBodyIntro }}
169179
170180 ⚠️ **Warning**: This build may contain unstable features and is intended for testing purposes only.
171181
0 commit comments