From 55b587f7baed7e4aa2d175fc42bb6902ae491fc2 Mon Sep 17 00:00:00 2001 From: Sathvik Kumar Date: Mon, 27 Apr 2026 11:56:56 +0000 Subject: [PATCH 1/2] Octopus Schema Migration to v10 --- .octopus/schema_version.ocl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.octopus/schema_version.ocl b/.octopus/schema_version.ocl index d55ce034..500586ec 100644 --- a/.octopus/schema_version.ocl +++ b/.octopus/schema_version.ocl @@ -1 +1 @@ -version = 9 \ No newline at end of file +version = 10 \ No newline at end of file From 20d2ebe303335c5ae0c1160eda2de63d4a58037e Mon Sep 17 00:00:00 2001 From: Sathvik Kumar Date: Mon, 27 Apr 2026 11:56:56 +0000 Subject: [PATCH 2/2] Use modern deployments bot for Winget push --- .octopus/deployment_process.ocl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.octopus/deployment_process.ocl b/.octopus/deployment_process.ocl index 04316f00..f65fd4d3 100644 --- a/.octopus/deployment_process.ocl +++ b/.octopus/deployment_process.ocl @@ -220,10 +220,14 @@ step "publish-winget-update-pr" { 'Accept' = "application/vnd.github+json"; 'X-GitHub-Api-Version' = "2022-11-28"; } + + $githubAccount = $OctopusParameters["Publish:Winget:GithubAccount"] + $githubPat = $OctopusParameters["Publish:Winget:GitHubPAT"] + $forkRepo = "$githubAccount/winget-pkgs" + try { - # Delete the fork of the winget-pkgs repo using the bot's token - $response = Invoke-WebRequest -Method "DELETE" -Uri "https://api.github.com/repos/team-integrations-fnm-bot/winget-pkgs" -Authentication "Bearer" -Token $OctopusParameters["Publish:Winget:GitHubPAT"] -Headers $headers + $response = Invoke-WebRequest -Method "DELETE" -Uri "https://api.github.com/repos/$forkRepo" -Authentication "Bearer" -Token $githubPat -Headers $headers $statusCode = $Response.StatusCode } catch { @@ -231,7 +235,7 @@ step "publish-winget-update-pr" { } if (!($statusCode -ge 200 -and $statusCode -le 299 )) { - Write-Warning "Failed to delete fork repo 'team-integrations-fnm-bot/winget-pkgs'. If this fork is too far behind its source, winget-create may fail." + Write-Warning "Failed to delete fork repo '$forkRepo'. If this fork is too far behind its source, winget-create may fail." } @@ -251,7 +255,8 @@ step "publish-winget-update-pr" { $Env:DOTNET_ROOT = "C:\Users\ContainerAdministrator\AppData\Local\Microsoft\dotnet" # This will perform the update and also create a PR with the relevant update - .\wingetcreate.exe update OctopusDeploy.Cli --urls $packageUrls --version $version --token $OctopusParameters["Publish:Winget:GitHubPAT"] --submit + .\wingetcreate.exe update OctopusDeploy.Cli --urls $packageUrls --version $version --token $githubPat --submit + EOT Octopus.Action.Script.ScriptSource = "Inline" Octopus.Action.Script.Syntax = "PowerShell"