Skip to content

Commit 0fd6df4

Browse files
Copilotjoaomoreno
andcommitted
Fix artifact upload paths to be relative to repo root
Remove '../' from upload-artifact paths as relative pathing with '..' is not allowed. Archives are created in .build/{platform}/archive/ inside the repo directory, and upload paths now reference them relative to repo root. Fixed for all three platforms (Linux, macOS, Windows). Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
1 parent 22ec32b commit 0fd6df4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/oss-build-fast.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,16 @@ jobs:
102102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103103

104104
- name: Create archive
105-
working-directory: ..
106105
run: |
106+
set -e
107107
mkdir -p .build/linux/archive
108-
tar -czf .build/linux/archive/VSCode-linux-$VSCODE_ARCH.tar.gz VSCode-linux-$VSCODE_ARCH
108+
tar -czf .build/linux/archive/VSCode-linux-$VSCODE_ARCH.tar.gz -C .. VSCode-linux-$VSCODE_ARCH
109109
110110
- name: Upload archive
111111
uses: actions/upload-artifact@v4
112112
with:
113113
name: vscode-linux-${{ env.VSCODE_ARCH }}
114-
path: ../.build/linux/archive/VSCode-linux-${{ env.VSCODE_ARCH }}.tar.gz
114+
path: .build/linux/archive/VSCode-linux-${{ env.VSCODE_ARCH }}.tar.gz
115115
retention-days: 7
116116

117117
darwin:
@@ -200,16 +200,16 @@ jobs:
200200
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
201201

202202
- name: Create archive
203-
working-directory: ..
204203
run: |
204+
set -e
205205
mkdir -p .build/darwin/archive
206-
tar -czf .build/darwin/archive/VSCode-darwin-$VSCODE_ARCH.tar.gz VSCode-darwin-$VSCODE_ARCH
206+
tar -czf .build/darwin/archive/VSCode-darwin-$VSCODE_ARCH.tar.gz -C .. VSCode-darwin-$VSCODE_ARCH
207207
208208
- name: Upload archive
209209
uses: actions/upload-artifact@v4
210210
with:
211211
name: vscode-darwin-${{ env.VSCODE_ARCH }}
212-
path: ../.build/darwin/archive/VSCode-darwin-${{ env.VSCODE_ARCH }}.tar.gz
212+
path: .build/darwin/archive/VSCode-darwin-${{ env.VSCODE_ARCH }}.tar.gz
213213
retention-days: 7
214214

215215
windows:
@@ -317,15 +317,14 @@ jobs:
317317

318318
- name: Create archive
319319
shell: pwsh
320-
working-directory: ..
321320
run: |
322321
New-Item -ItemType Directory -Force -Path .build/win32-$env:VSCODE_ARCH/archive
323322
$archivePath = ".build/win32-$env:VSCODE_ARCH/archive/VSCode-win32-$env:VSCODE_ARCH.zip"
324-
7z.exe a -tzip $archivePath VSCode-win32-$env:VSCODE_ARCH/* "-xr!CodeSignSummary*.md"
323+
7z.exe a -tzip $archivePath ../VSCode-win32-$env:VSCODE_ARCH/* "-xr!CodeSignSummary*.md"
325324
326325
- name: Upload archive
327326
uses: actions/upload-artifact@v4
328327
with:
329328
name: vscode-win32-${{ env.VSCODE_ARCH }}
330-
path: ../.build/win32-${{ env.VSCODE_ARCH }}/archive/VSCode-win32-${{ env.VSCODE_ARCH }}.zip
329+
path: .build/win32-${{ env.VSCODE_ARCH }}/archive/VSCode-win32-${{ env.VSCODE_ARCH }}.zip
331330
retention-days: 7

0 commit comments

Comments
 (0)