Skip to content

Commit de307fd

Browse files
Update release workflow to inject codeEditorVersion
1 parent 2126b11 commit de307fd

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

.github/workflows/release.yaml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,31 @@ jobs:
4949
run: |
5050
gh run download --name "$COMMIT_SHA-code-editor-sagemaker-server-build" --name "$COMMIT_SHA-code-editor-sagemaker-server-src"
5151
52-
- name: Check artifacts exist and rename
52+
- name: Check artifacts exist
5353
run: |
5454
ls -la
55-
56-
# Rename build artifact
57-
BUILD_TARBALL=$(find . -name "*build*.tar.gz" | head -1 || true)
58-
if [ -n "$BUILD_TARBALL" ]; then
59-
cp "$BUILD_TARBALL" "code-editor-sagemaker-${VERSION_NUM}.tar.gz"
60-
echo "Copied $BUILD_TARBALL to code-editor-sagemaker-${VERSION_NUM}.tar.gz"
61-
else
62-
echo "Error: No build artifacts found for commit $COMMIT_SHA"
63-
exit 1
64-
fi
65-
66-
# Rename src artifact
67-
SRC_TARBALL=$(find . -name "*src*.tar.gz" | head -1 || true)
68-
if [ -n "$SRC_TARBALL" ]; then
69-
cp "$SRC_TARBALL" "code-editor-sagemaker-src-${VERSION_NUM}.tar.gz"
70-
echo "Copied $SRC_TARBALL to code-editor-sagemaker-src-${VERSION_NUM}.tar.gz"
71-
else
72-
echo "Error: No src artifacts found for commit $COMMIT_SHA"
73-
exit 1
74-
fi
55+
56+
# Check build artifact exists
57+
for file in "code-editor-sagemaker-server-build.tar.gz" "code-editor-sagemaker-server-src.tar.gz"; do
58+
if [ ! -f "$file" ]; then
59+
echo "Error: $file not found for commit $COMMIT_SHA"
60+
exit 1
61+
fi
62+
done
63+
64+
- name: Untar, Inject current Code Editor Version and Re-tar
65+
run: |
66+
tar xzf code-editor-sagemaker-server-build.tar.gz
67+
cd vscode-reh-web-linux-x64
68+
jq '.codeEditorVersion = "$VERSION_NUM"' product.json > temp.json && mv temp.json product.json
69+
tar -czf code-editor-sagemaker-server-${VERSION_NUM}.tar.gz vscode-reh-web-linux-x64
70+
rm -rf vscode-reh-web-linux-x64
71+
72+
tar xzf code-editor-sagemaker-server-src.tar.gz
73+
cd code-editor-src
74+
jq '.codeEditorVersion = "$VERSION_NUM"' product.json > temp.json && mv temp.json product.json
75+
tar -czf code-editor-sagemaker-src-${VERSION_NUM}.tar.gz code-editor-src
76+
rm -rf code-editor-src
7577
7678
- name: Create GitHub release
7779
run: |

0 commit comments

Comments
 (0)