File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,6 +123,32 @@ jobs:
123123 file : |
124124 "**/Ocaramba**.csproj","Ocaramba.Templates.VSIX/source.extension.vsixmanifest", "!**/Ocaramba.Templates.csproj"
125125 version : ${{ env.templateVersion }}
126+ - name : Set environment variables from version outputs
127+ shell : pwsh
128+ run : |
129+ # Path to the VSIX manifest
130+ $manifestPath = "Ocaramba.Templates.VSIX/source.extension.vsixmanifest"
131+
132+ $version = $env:templateVersion # or replace with your own variable source
133+
134+ # Load XML
135+ [xml]$xml = Get-Content $manifestPath
136+
137+ # Navigate to the Identity node
138+ $identityNode = $xml.PackageManifest.Metadata.Identity
139+
140+ if (-not $identityNode) {
141+ throw "Identity node not found in manifest."
142+ }
143+
144+ # Update the Version attribute
145+ $identityNode.Version = $version
146+
147+ # Save the updated manifest
148+ $xml.Save($manifestPath)
149+
150+ Write-Host "Updated VSIX manifest version to $version"
151+
126152 - run : msbuild -t:Restore /p:configuration='${{ env.buildConfiguration }}' /v:minimal
127153 - run : msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' /v:minimal
128154 - uses : actions/upload-artifact@v4
@@ -141,3 +167,4 @@ jobs:
141167
142168
143169
170+
You can’t perform that action at this time.
0 commit comments