Deploy #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Release Version | |
default: v2.1.4 | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup environment variables | |
run: | | |
echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
echo "INSTALL_REF=${{ github.event.inputs.version }}" >> "$GITHUB_ENV" | |
# TODO: fix cache | |
- name: Setup emsdk | |
uses: mymindstorm/setup-emsdk@v14 | |
# with: | |
# version: 3.1.58 | |
# actions-cache-folder: emsdk-cache | |
- name: Checkout Lite XL | |
uses: actions/checkout@v4 | |
with: | |
repository: lite-xl/lite-xl | |
ref: ${{ github.event.inputs.version }} | |
- name: Checkout this repository | |
uses: actions/checkout@v4 | |
with: | |
path: web | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install meson | |
run: pip install meson ninja | |
- name: Build Portable | |
run: | | |
meson setup build --buildtype release -Dportable=true \ | |
--cross-file resources/cross/unknown-wasm32.txt \ | |
--cross-file web/cross/disable-pcre2-jit.txt | |
meson compile -C build | |
- name: Create Lite XL Package | |
run: | | |
bash scripts/package.sh --builddir build --version ${INSTALL_REF} --debug --addons | |
- name: Create distribution files | |
run: | | |
mkdir dist | |
find . -not -path '*/.*' | |
cp -R web/shell/index.html lite-xl/bin/lite-xl.js build/src/lite-xl.wasm dist | |
python $EMSDK/tools/file_packager.py bundle-data --preload lite-xl/share@/usr/share \ | |
--js-output bundle-data.js --no-force --use-preload-cache --no-node | |
cp bundle-data.js bundle-data.data dist | |
- name: Create Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: output | |
path: dist |