Skip to content

Commit a617d20

Browse files
authored
Update build.yml
Signed-off-by: Hudson Xing <77495133+harvenstar@users.noreply.github.com>
1 parent 3f35c82 commit a617d20

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,29 +90,39 @@ jobs:
9090
# Run the gulp build task using npx
9191
npx gulp vscode-reh-web-${ARCH_ALIAS}-min
9292
93-
# Step 7: Find the exact path of the build output directory.
93+
# Step 7: Find the exact path of the original build output directory.
9494
- name: Find build output
9595
id: find_output
9696
run: |
97-
BUILD_PATH=$(find . -name "sagemaker-code-editor" -type d | head -n 1)
97+
BUILD_PATH=$(find . -name "vscode-reh-web-linux-x64" -type d | head -n 1)
9898
if [ -z "$BUILD_PATH" ]; then
99-
echo "::error::Build output directory 'sagemaker-code-editor' not found!"
99+
echo "::error::Build output directory 'vscode-reh-web-linux-x64' not found!"
100100
exit 1
101101
fi
102102
echo "Build output found at: $BUILD_PATH"
103103
echo "build_path=$BUILD_PATH" >> $GITHUB_OUTPUT
104104
105-
# Step 8: Create a compressed tarball of the build output.
105+
# Step 8: Rename the build output directory to sagemaker-code-editor
106+
- name: Rename build output directory
107+
id: rename_output
108+
run: |
109+
ORIG_PATH="${{ steps.find_output.outputs.build_path }}"
110+
PARENT_DIR=$(dirname "$ORIG_PATH")
111+
mv "$ORIG_PATH" "$PARENT_DIR/sagemaker-code-editor"
112+
echo "Renamed build output directory to: $PARENT_DIR/sagemaker-code-editor"
113+
echo "build_path=$PARENT_DIR/sagemaker-code-editor" >> $GITHUB_OUTPUT
114+
115+
# Step 9: Create a compressed tarball of the renamed build output.
106116
- name: Create tarball archive
107117
run: |
108118
TARBALL="sagemaker-code-editor-${{ env.VERSION }}.tar.gz"
109-
BUILD_DIR_PATH="${{ steps.find_output.outputs.build_path }}"
119+
BUILD_DIR_PATH="${{ steps.rename_output.outputs.build_path }}"
110120
PARENT_DIR=$(dirname "$BUILD_DIR_PATH")
111121
BUILD_DIR_NAME=$(basename "$BUILD_DIR_PATH")
112122
echo "Creating '$TARBALL' from '$BUILD_DIR_NAME' in '$PARENT_DIR'"
113123
tar czf $TARBALL -C "$PARENT_DIR" "$BUILD_DIR_NAME"
114124
115-
# Step 9: Upload the tarball as a build artifact.
125+
# Step 10: Upload the tarball as a build artifact.
116126
- name: Upload build artifact
117127
uses: actions/upload-artifact@v4
118128
with:

0 commit comments

Comments
 (0)