3232 WORKING_DIR : ' ${{ github.workspace }}' # D:\a\Files\Files\
3333 PROJECT_DIR : ' ${{ github.workspace }}\src\Files.App.Controls'
3434 PACKAGE_PROJECT_PATH : ' ${{ github.workspace }}\src\Files.App.Controls\Files.App.Controls.csproj'
35- PACKAGE_MANIFEST_PATH : ' ${{ github.workspace }}\src\Files.App (Package)\Package.appxmanifest'
3635
3736 steps :
3837 - name : Checkout the repository
@@ -51,13 +50,13 @@ jobs:
5150 run : |
5251 for /f %%a in ('dir /b /a:d %localappdata%\Microsoft\VisualStudio\17*') do echo UsePreviews=True>%localappdata%\Microsoft\VisualStudio\%%a\sdk.txt
5352
54- - name : Extract Version from Package.appxmanifest
53+ - name : Extract Version from CurrentVersion.props
5554 id : extract_version
5655 shell : pwsh
5756 run : |
58- $xml = [xml](Get-Content $env:PACKAGE_MANIFEST_PATH )
59- $version = $xml.Package.Identity .Version
60- Write-Output "Found package version, $version"
57+ $xml = [xml](Get-Content $env:PROJECT_DIR\CurrentVersion.props )
58+ $version = $xml.Project.PropertyGroup .Version
59+ Write-Output "Found publish version, $version"
6160 echo "::set-output name=version::$version"
6261
6362 - name : Restore NuGet
7675 -p:Configuration=$env:CONFIGURATION
7776
7877 - name : Package Files UI Controls
79- run : dotnet pack ${{ env.PACKAGE_PROJECT_PATH }} --configuration Release --no-build -o ./output -p:Version=${{ steps.extract_version.outputs.version }}
78+ run : dotnet pack ${{ env.PACKAGE_PROJECT_PATH }} --configuration ${{ env.CONFIGURATION }} --no-build -o ./output -p:Version=${{ steps.extract_version.outputs.version }}
8079
8180 - name : Publish package to NuGet
8281 run : dotnet nuget push ./output/*.nupkg --api-key (SECRET GOES HERE) --source https://api.nuget.org/v3/index.json
0 commit comments