File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,23 @@ jobs:
2424 - name : .NET Info
2525 run : dotnet --info
2626
27- - name : Read XML with PowerShell
28- id : getxml
27+ - name : Install libxml2
2928 run : |
30- [xml]$xml = Get-Content ./src/Ocelot.Testing.csproj
31- $value_Version = $xml.SelectSingleNode("//Project/PropertyGroup/Version").InnerText
32- echo "::set-output name=Version::$value_Version"
33-
29+ sudo apt update
30+ sudo apt install libxml2-utils
31+ - name : Read XML
32+ id : xml
33+ run : |
34+ xml_value=$(xmllint --xpath "string(//Project/PropertyGroup/Version)" ./src/Ocelot.Testing.csproj)
35+ echo "Version: $xml_value"
36+ echo "Version=$xml_value" >> $GITHUB_OUTPUT
37+ xml_value=$(xmllint --xpath "string((//Project/ItemGroup)[2]/PackageReference[@Include='Ocelot']/@Version)" ./src/Ocelot.Testing.csproj)
38+ echo "Ocelot Ref Ver: $xml_value"
39+ echo "OcelotRefVer=$xml_value" >> $GITHUB_OUTPUT
3440 - name : Use extracted value
3541 run : |
36- echo "Extracted value: ${{ steps.getxml.outputs.Version }}"
42+ echo "Version: ${{ steps.xml.outputs.Version }}"
43+ echo "Ocelot Ref Ver: ${{ steps.xml.outputs.OcelotRefVer }}"
3744
3845 # - name: Create GitHub Release
3946 # uses: actions/create-release@v1
You can’t perform that action at this time.
0 commit comments