diff --git a/.github/workflows/unity-xref-maps.yml b/.github/workflows/unity-xref-maps.yml index 0fd864f..5fc699a 100644 --- a/.github/workflows/unity-xref-maps.yml +++ b/.github/workflows/unity-xref-maps.yml @@ -94,7 +94,7 @@ jobs: shell: pwsh id: set-unity-releases-versions run: | - $url = 'https://services.api.unity.com/unity/editor/release/v1/releases?' + ` + $baseUrl = 'https://services.api.unity.com/unity/editor/release/v1/releases?' + ` 'architecture=X86_64&' + ` 'platform=WINDOWS&' + ` 'limit=25&' + ` @@ -102,9 +102,17 @@ jobs: 'stream=SUPPORTED&' + ` 'stream=TECH' - $response = Invoke-RestMethod $url + $allResults = @() + $offset = 0 - $versions = $response.results + do + { + $response = Invoke-RestMethod "$baseUrl&offset=$offset" + $allResults += $response.results + $offset += 25 + } while ($response.results.Count -gt 0) + + $versions = $allResults | Select-Object -ExpandProperty version | ForEach-Object { $match = [regex]::Match($_, '(?(?(\d+)\.(\d+))\.(\d+))') @@ -214,6 +222,8 @@ jobs: --docFxConfigurationFilePath '${{ runner.temp }}/Work/docfx.json' ` --xrefMapsPath "${{ runner.temp }}/_site/$($version.ShortVersion)/xrefmap.yml" + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + - name: Upload artifact uses: actions/upload-artifact@v5 with: