Skip to content

Added update-automation.yaml #12

Added update-automation.yaml

Added update-automation.yaml #12

Workflow file for this run

name: Build Code Editor Targets
on:
push:
branches:
- 'main'
- '*.*.x'
- '*.*.*'
workflow_dispatch:
jobs:
build:
name: Build Code Editor Targets
runs-on: ubuntu-latest
environment: build-targets-workflow-env
strategy:
matrix:
build-target: [code-editor-server, code-editor-sagemaker-server, code-editor-web-embedded]
exclude:
# Only build SageMaker for now, remove the excluded targets when needed in the future.
- build-target: code-editor-server
- build-target: code-editor-web-embedded
steps:
- name: Start Build Workflow
run: |
echo "Starting Build Workflow for target: ${{ matrix.build-target }}"
- name: Set up build environment
run: |
echo "Installing required dependencies"
sudo apt-get update
sudo apt-get install -y quilt libkrb5-dev libx11-dev libxkbfile-dev libxml2-utils
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run patches script
run: |
./scripts/prepare-src.sh
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: 'code-editor-src/package-lock.json'
- name: Install code editor dependencies
run: |
cd code-editor-src
echo "Installing dependencies" && npm ci
- name: Build artifacts
run: |
./scripts/build-artifacts.sh ${{ matrix.build-target }}
- name: Prepare artifacts to upload
run: |
BUILD_TARGET=$(./scripts/determine-build-target.sh ${{ matrix.build-target }})
tar -czf code-editor-src.tar.gz ./code-editor-src
tar -czf build.tar.gz ./$BUILD_TARGET
- name: Upload src artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-${{ matrix.build-target }}-src
path: code-editor-src.tar.gz
retention-days: 90
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-${{ matrix.build-target }}-build
path: build.tar.gz
retention-days: 90