|
27 | 27 |
|
28 | 28 | jobs: |
29 | 29 | SynchApiDocsFromSource: |
30 | | - |
| 30 | + name: "Update api docs from product binaries" |
31 | 31 | runs-on: windows-latest |
32 | 32 | env: |
33 | 33 | PROJECT_NAME: TradosStudio |
|
41 | 41 | env: |
42 | 42 | AZURE_DEVOPS_TOKEN: ${{ secrets.AZURE_DEVOPS_TOKEN }} |
43 | 43 | run: | |
44 | | - $binPath = "${{ github.workspace }}..\..\Code\Bin\Mixed Platforms\Debug" |
| 44 | + $binPath = [System.IO.Path]::GetFullPath("${{ github.workspace }}..\..\Code\Bin\Mixed Platforms\Debug") |
45 | 45 | New-Item -ItemType Directory -Force -Path $binPath | Out-Null |
46 | 46 |
|
47 | 47 | $orgUrl = "https://dev.azure.com/sdl" |
|
50 | 50 | $branchName = "refs/heads/${{ inputs.projectBranch }}" |
51 | 51 | $artifactName = "binaries" |
52 | 52 |
|
| 53 | + write-host "Fetching latest build artifacts for pipeline ID $env:PIPELINE_ID on branch $branchName to populate $binPath" |
| 54 | +
|
53 | 55 | $headers = @{ |
54 | 56 | Authorization = "Basic " + [Convert]::ToBase64String( |
55 | 57 | [Text.Encoding]::ASCII.GetBytes(":$env:AZURE_DEVOPS_TOKEN")) |
@@ -79,11 +81,11 @@ jobs: |
79 | 81 | $downloadUrl = $artifact.resource.downloadUrl |
80 | 82 | Write-Host "Downloading artifact from: $downloadUrl" |
81 | 83 |
|
82 | | - $zipPath = "${{ github.workspace }}\binaries.zip" |
| 84 | + $zipPath = "${{ RUNNER.TEMP }}\binaries.zip" |
83 | 85 | Invoke-WebRequest -Uri $downloadUrl -Headers $headers -OutFile $zipPath |
84 | 86 |
|
85 | 87 | # Extract and copy to target bin path |
86 | | - $extractDir = "${{ github.workspace }}\binaries_extracted" |
| 88 | + $extractDir = "${{ RUNNER.TEMP }}\binaries_extracted" |
87 | 89 | Expand-Archive -Path $zipPath -DestinationPath $extractDir -Force |
88 | 90 | # ADO container artifacts unzip into a subfolder named after the artifact |
89 | 91 | $innerDir = Join-Path $extractDir $artifactName |
@@ -198,12 +200,13 @@ jobs: |
198 | 200 | Copy-Item -Path $metadataPath -Destination .\source-version-metadata.json -Force |
199 | 201 | } |
200 | 202 |
|
201 | | - write-host "committing and pushing changes to $featureBranch" |
| 203 | + write-host "staging changes for commit" |
202 | 204 | git add .\api\*.* |
203 | 205 | if (Test-Path .\source-version-metadata.json) { |
204 | 206 | git add .\source-version-metadata.json |
205 | 207 | } |
206 | 208 |
|
| 209 | + write-host "committing and pushing changes to $featureBranch" |
207 | 210 | git commit -a -m "update api doc" |
208 | 211 | git push $repoURL |
209 | 212 |
|
|
0 commit comments