Skip to content

Commit 31051bc

Browse files
authored
Merge pull request #162 from harvenstar/1.8
feat: add build and release workflow to main
2 parents b5be6c9 + a617d20 commit 31051bc

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ 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: |
@@ -101,20 +101,30 @@ jobs:
101101
fi
102102
echo "Build output found at: $BUILD_PATH"
103103
echo "build_path=$BUILD_PATH" >> $GITHUB_OUTPUT
104-
105-
# Step 8: Create a compressed tarball of the build output.
104+
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: |
108-
TARBALL="vscode-reh-web-linux-x64-${{ env.VERSION }}.tar.gz"
109-
BUILD_DIR_PATH="${{ steps.find_output.outputs.build_path }}"
118+
TARBALL="sagemaker-code-editor-${{ env.VERSION }}.tar.gz"
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"
114-
115-
# Step 9: Upload the tarball as a build artifact.
124+
125+
# Step 10: Upload the tarball as a build artifact.
116126
- name: Upload build artifact
117127
uses: actions/upload-artifact@v4
118128
with:
119129
name: npm-package
120-
path: vscode-reh-web-linux-x64-${{ env.VERSION }}.tar.gz
130+
path: sagemaker-code-editor-${{ env.VERSION }}.tar.gz

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Workflow name
22
name: Release
33

4-
# This workflow is triggered manually from the GitHub Actions tab test.
4+
# This workflow is triggered manually from the GitHub Actions tab.
55
on:
66
workflow_dispatch:
77
inputs:

0 commit comments

Comments
 (0)