Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/GitFlow_Nightly-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
# Automated nightly builds at midnight
schedule:
- cron: "0 0 * * *"
# Manual trigger for testing purposes
workflow_dispatch:

permissions:
contents: write
Expand Down Expand Up @@ -91,16 +93,24 @@ jobs:
$MsiBase = $NextSemver.Split("-")[0] # Remove prerelease segment
$MsiVersion = "$MsiBase.$commit_count_mod"

# Format the release name
$ReleaseName = "WAU $NextSemver [Nightly Build]"
# Format the release name based on trigger type
if ("${{ github.event_name }}" -eq "workflow_dispatch") {
$ReleaseName = "WAU $NextSemver [Pre-release Build]"
$ReleaseBodyIntro = "This is a **pre-release build** created from the latest changes in the develop branch."
} else {
$ReleaseName = "WAU $NextSemver [Nightly Build]"
$ReleaseBodyIntro = "This is an **automated nightly build** created from the latest changes in the develop branch."
}

# Output all version information
echo "MSI version: $MsiVersion"
echo "Semver created: $NextSemver"
echo "Release name: $ReleaseName"
echo "Release body intro: $ReleaseBodyIntro"
echo "MsiVersion=$MsiVersion" >> $env:GITHUB_OUTPUT
echo "NextSemVer=$NextSemver" >> $env:GITHUB_OUTPUT
echo "ReleaseName=$ReleaseName" >> $env:GITHUB_OUTPUT
echo "ReleaseBodyIntro=$ReleaseBodyIntro" >> $env:GITHUB_OUTPUT

# Step 5: Build the project and generate artifacts
- name: Build project
Expand Down Expand Up @@ -155,7 +165,7 @@ jobs:

# Step 6: Create GitHub release with all artifacts
- name: Create release
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
uses: ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af # v1.18.0
if: steps.check_prs.outputs.BUILD_NEEDED == 'true'
with:
tag: v${{ steps.format_version.outputs.NextSemVer }}
Expand All @@ -165,7 +175,7 @@ jobs:
name: ${{ steps.format_version.outputs.ReleaseName }}
artifacts: "WAU.msi,WAU_ADMX.zip,WAU_InstallCounter"
body: |
This is an **automated nightly build** created from the latest changes in the develop branch.
${{ steps.format_version.outputs.ReleaseBodyIntro }}

鈿狅笍 **Warning**: This build may contain unstable features and is intended for testing purposes only.

Expand Down
Loading