@@ -32,15 +32,19 @@ jobs:
3232 dotnet-version : 9.0.x
3333 - name : Build
3434 run : |
35+ # if it is a pull request build set the build identity to branchname.runnumber
3536 if ("${{ github.event_name }}" -eq "pull_request" -and "${{ github.head_ref }}" -ne "") {
3637 $branchName = "${{ github.head_ref }}" -replace '[/\\]', '-' -replace '[^a-zA-Z0-9\-]', ''
37- $preReleaseId = "$branchName.${{ github.run_number }}"
38+ $buildIdentity = "$branchName.${{ github.run_number }}"
3839
39- Write-Host "PR build - setting pre-release identifiers to: $preReleaseId (height ignored)"
40- $env:IS_BRANCH_BUILD = "true"
41- $env:BRANCH_PRE_RELEASE_ID = $preReleaseId
40+ $env:BUILD_IDENTITY = $buildIdentity
4241 }
4342
43+ # if it is a scheduled build set the build identity to nightly
44+ if ("${{ github.event_name }}" -eq "schedule" -or ${{ inputs.nightly }}) {
45+ $env:BUILD_IDENTITY = "nightly.${{ github.run_number }}"
46+ }
47+
4448 dotnet build LibGit2Sharp.sln --configuration Release
4549 shell : pwsh
4650 - name : Show version
@@ -134,17 +138,8 @@ jobs:
134138 - uses : actions/download-artifact@v4
135139 with :
136140 path : staging
137- - name : Push package to feed 🐙 (nightly)
138- if : github.event_name == 'schedule' || inputs.nightly
139- id : push-feed-nightly
140- shell : bash
141- env :
142- FEED_API_KEY : ${{ secrets.FEED_API_KEY }}
143- FEED_SOURCE : ${{ secrets.FEED_SOURCE }}
144- run : dotnet nuget push staging/**/*.nupkg --api-key "$FEED_API_KEY" --source "$FEED_SOURCE" --skip-duplicate
145141 - name : Push package to feed 🐙 (regular)
146- if : github.event_name != 'schedule' && !inputs.nightly
147- id : push-feed-regular
142+ id : push-feed
148143 shell : bash
149144 env :
150145 FEED_API_KEY : ${{ secrets.FEED_API_KEY }}
0 commit comments