File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 Write-Output "PACKAGE_VERSION_SUFFIX=$versionSuffix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
7171
7272 - name : Calculate package version (for branch)
73- if : ${{ github.event_name == 'push' }}
73+ # if: ${{ github.event_name == 'push' }}
7474 env :
7575 BRANCH_NAME : ${{ github.ref_name }}
7676 shell : pwsh
8484 Write-Output "Using version suffix: $versionSuffix"
8585 Write-Output "PACKAGE_VERSION_SUFFIX=$versionSuffix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
8686
87- - name : Calculate package version (for pr)
88- if : ${{ github.event_name == 'pull_request' }}
89- shell : pwsh
90- run : |
91- # Get the version suffix from the PR number and auto-incrementing build number. For example: '18' and '123' => 'pr18-00123'
92- $revision = "{0:D5}" -f [convert]::ToInt32(${{ github.run_number }}, 10)
93- $versionSuffix = "pr${{ github.event.number }}-$revision"
94-
95- Write-Output "Using version suffix: $versionSuffix"
96- Write-Output "PACKAGE_VERSION_SUFFIX=$versionSuffix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
97-
9887 - name : Build solution
9988 run : dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release --verbosity minimal /p:VersionSuffix=${{ env.PACKAGE_VERSION_SUFFIX }}
10089
You can’t perform that action at this time.
0 commit comments