Skip to content

Commit 30044b4

Browse files
authored
Merge pull request #991 from Romanitho/rollback
Restore Get-WAUConfig after accidental removal
2 parents bebd646 + b86e5fe commit 30044b4

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/GitFlow_Nightly-builds.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
# Automated nightly builds at midnight
1111
schedule:
1212
- cron: "0 0 * * *"
13+
# Manual trigger for testing purposes
14+
workflow_dispatch:
1315

1416
permissions:
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
@@ -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

Sources/Winget-AutoUpdate/Winget-Upgrade.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ $Script:ProgressPreference = [System.Management.Automation.ActionPreference]::Si
1919
# Log initialization
2020
[string]$LogFile = [System.IO.Path]::Combine($Script:WorkingDir, 'logs', 'updates.log');
2121

22+
#region Get settings and Domain/Local Policies (GPO) if activated.
23+
Write-ToLog "Reading WAUConfig";
24+
$Script:WAUConfig = Get-WAUConfig;
25+
#endregion Get settings and Domain/Local Policies (GPO) if activated.
26+
2227
# Default name of winget repository used within this script
2328
[string]$DefaultWingetRepoName = 'winget';
2429

0 commit comments

Comments
 (0)