File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11name : Build and Test
22
33on :
4+ workflow_dispatch :
45 pull_request :
56 branches : [ master ]
67 push :
@@ -138,6 +139,16 @@ jobs:
138139 if : ${{ github.event_name == 'pull_request' }}
139140 run : echo "PKG_SUFFIX=-PR" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
140141
142+ # NOTE: Should be used in next step as well, but only used for debugging for now
143+ - name : Set package version
144+ run : >-
145+ $PKG_GIT_VERSION="$(git describe --abbrev | % { $_.substring(1) })"
146+ Write-Output "Git describe: $PKG_GIT_VERSION"
147+ Write-Output "Package suffix: $env:PKG_SUFFIX"
148+ $PKG_VERSION = "${PKG_GIT_VERSION}${env:PKG_SUFFIX}"
149+ Write-Output "Package version: $PKG_VERSION"
150+ Write-Output "PKG_VERSION=$PKG_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
151+
141152 - name : Create nuget package
142153 run : dotnet pack ${{ env.PKG_PROJ }} -c Release --output dist ${{ env.PKG_PROPS }} /p:Version=$(git describe --abbrev | % { $_.substring(1) })${{ env.PKG_SUFFIX }}
143154
You can’t perform that action at this time.
0 commit comments