32
32
WORKING_DIR : ' ${{ github.workspace }}' # D:\a\Files\Files\
33
33
PROJECT_DIR : ' ${{ github.workspace }}\src\Files.App.Controls'
34
34
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'
36
35
37
36
steps :
38
37
- name : Checkout the repository
@@ -51,13 +50,13 @@ jobs:
51
50
run : |
52
51
for /f %%a in ('dir /b /a:d %localappdata%\Microsoft\VisualStudio\17*') do echo UsePreviews=True>%localappdata%\Microsoft\VisualStudio\%%a\sdk.txt
53
52
54
- - name : Extract Version from Package.appxmanifest
53
+ - name : Extract Version from CurrentVersion.props
55
54
id : extract_version
56
55
shell : pwsh
57
56
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"
61
60
echo "::set-output name=version::$version"
62
61
63
62
- name : Restore NuGet
76
75
-p:Configuration=$env:CONFIGURATION
77
76
78
77
- 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 }}
80
79
81
80
- name : Publish package to NuGet
82
81
run : dotnet nuget push ./output/*.nupkg --api-key (SECRET GOES HERE) --source https://api.nuget.org/v3/index.json
0 commit comments