1818 build :
1919 name : Create Nightly Build
2020 runs-on : windows-latest
21+
22+ env :
23+ # Define the branch as a variable
24+ BRANCH : develop
25+
2126 steps :
2227 # Step 1: Checkout the develop branch for nightly builds
2328 - name : Checkout code
2631 lfs : " true"
2732 fetch-depth : 0
2833 # Always checkout develop for nightly builds
29- ref : develop
34+ ref : ${{ env.BRANCH }}
3035
3136 # Step 2: Verify if a new build is required by checking for merged PRs since last tag
3237 - name : Check for merged PRs since last tag
3843 Write-Host "Latest tag: $LATEST_TAG"
3944
4045 # Get merged PRs since last tag using Git directly
41- $MERGED_PRS = git log --merges --grep="Merge pull request" --oneline "$LATEST_TAG..develop "
46+ $MERGED_PRS = git log --merges --grep="Merge pull request" --oneline "$LATEST_TAG..${{ env.BRANCH }} "
4247
4348 # If merged PRs exist, set BUILD_NEEDED and determine release type
4449 if ($MERGED_PRS) {
5762 Write-Host "Next release: $RELEASE_TYPE"
5863 } else {
5964 # If no merged PRs, skip building
60- Write-Host "No PRs merged to develop since latest tag. Skipping build."
65+ Write-Host "No PRs merged to ${{ env.BRANCH }} since latest tag. Skipping build."
6166 echo "BUILD_NEEDED=false" >> $env:GITHUB_OUTPUT
6267 }
6368
@@ -154,6 +159,7 @@ jobs:
154159 if : steps.check_prs.outputs.BUILD_NEEDED == 'true'
155160 with :
156161 tag : v${{ steps.format_version.outputs.NextSemVer }}
162+ commit : ${{ env.BRANCH }}
157163 prerelease : true
158164 generateReleaseNotes : true
159165 name : ${{ steps.format_version.outputs.ReleaseName }}
@@ -169,4 +175,4 @@ jobs:
169175 |[WAU.msi](https://github.com/Romanitho/Winget-AutoUpdate/releases/download/v${{ steps.format_version.outputs.NextSemVer }}/WAU.msi) (x64)|`${{ steps.build_project.outputs.msi_sha }}`|<picture></picture>|
170176 |[WAU_ADMX.zip](https://github.com/Romanitho/Winget-AutoUpdate/releases/download/v${{ steps.format_version.outputs.NextSemVer }}/WAU_ADMX.zip)|`${{ steps.build_project.outputs.admx_sha }}`|<picture></picture>|
171177
172- <picture></picture>
178+ <picture></picture>
0 commit comments