From 0b236c11d9a74b51abeb16a62906c664a303362c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20B=C3=A9dard?= Date: Fri, 7 Aug 2026 13:12:28 -0400 Subject: [PATCH] fix(ci): warm the Artifactory cache for every published npm package The step was hardcoded to gateway-client, so the four other packages published by this workflow were never pulled into npm-remote-cache and consumers got a 403 on their first install. --- .github/workflows/publish-libraries.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-libraries.yml b/.github/workflows/publish-libraries.yml index c267366f6..2679d4ac3 100644 --- a/.github/workflows/publish-libraries.yml +++ b/.github/workflows/publish-libraries.yml @@ -240,7 +240,23 @@ jobs: shell: pwsh - name: Update Artifactory Cache - run: gh workflow run update-artifactory-cache.yml --repo Devolutions/scheduled-tasks --field package_name="gateway-client" + run: | + Set-PSDebug -Trace 1 + + $Files = Get-ChildItem -Recurse npm-packages/*.tgz + + foreach ($File in $Files) { + $Manifest = (tar -xzOf "$File" package/package.json | Out-String) | ConvertFrom-Json + $PackageName = $Manifest.name -Replace '^@devolutions/', '' + + Write-Host "Updating Artifactory cache for $($Manifest.name)..." + gh workflow run update-artifactory-cache.yml --repo Devolutions/scheduled-tasks --field package_name="$PackageName" + + if ($LastExitCode -Ne 0) { + throw "Failed to trigger the Artifactory cache update for $($Manifest.name)" + } + } + shell: pwsh env: GH_TOKEN: ${{ secrets.DEVOLUTIONSBOT_WRITE_TOKEN }}