2022-09-25 22:59:01 +02:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
2022-10-11 06:02:12 +02:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v[0-9]+.*
|
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: Release Version
|
2024-04-16 13:12:43 +02:00
|
|
|
default: v2.1.4
|
2022-09-25 22:59:01 +02:00
|
|
|
required: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Create Release
|
2023-04-11 17:33:34 +02:00
|
|
|
runs-on: ubuntu-latest
|
2024-04-15 05:44:06 +02:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2022-09-25 22:59:01 +02:00
|
|
|
outputs:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
version: ${{ steps.tag.outputs.version }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/checkout@v3
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Fetch Version
|
|
|
|
id: tag
|
|
|
|
run: |
|
|
|
|
if [[ "${{ github.event.inputs.version }}" != "" ]]; then
|
|
|
|
echo ::set-output name=version::${{ github.event.inputs.version }}
|
|
|
|
else
|
|
|
|
echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
|
|
|
|
fi
|
2022-10-11 06:02:12 +02:00
|
|
|
- name: Update Tag
|
|
|
|
uses: richardsimko/update-tag@v1
|
|
|
|
with:
|
|
|
|
tag_name: ${{ steps.tag.outputs.version }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Create Release
|
|
|
|
id: create_release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
tag_name: ${{ steps.tag.outputs.version }}
|
|
|
|
name: Lite XL ${{ steps.tag.outputs.version }}
|
|
|
|
draft: true
|
|
|
|
body_path: changelog.md
|
|
|
|
generate_release_notes: true
|
|
|
|
|
|
|
|
build_linux:
|
|
|
|
name: Linux
|
|
|
|
needs: release
|
2023-04-11 17:33:34 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-08-05 03:00:17 +02:00
|
|
|
container: ghcr.io/lite-xl/lite-xl-build-box:latest
|
2022-09-25 22:59:01 +02:00
|
|
|
env:
|
|
|
|
CC: gcc
|
|
|
|
CXX: g++
|
|
|
|
steps:
|
|
|
|
- name: Set Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
|
2023-04-07 19:24:27 +02:00
|
|
|
- uses: actions/checkout@v3
|
2023-04-16 15:18:40 +02:00
|
|
|
|
|
|
|
# disabled because this will break our own Python install
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Python Setup
|
2023-04-16 15:18:40 +02:00
|
|
|
if: false
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/setup-python@v4
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
|
|
|
python-version: 3.9
|
2023-04-16 15:18:40 +02:00
|
|
|
|
|
|
|
# disabled because the container has up-to-date packages
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Update Packages
|
2023-04-16 15:18:40 +02:00
|
|
|
if: false
|
2022-09-25 22:59:01 +02:00
|
|
|
run: sudo apt-get update
|
2023-04-16 15:18:40 +02:00
|
|
|
|
|
|
|
# disabled as the dependencies are already installed
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Install Dependencies
|
2023-04-16 15:18:40 +02:00
|
|
|
if: false
|
2022-09-25 22:59:01 +02:00
|
|
|
run: |
|
|
|
|
bash scripts/install-dependencies.sh --debug
|
|
|
|
sudo apt-get install -y ccache
|
2023-04-16 15:18:40 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Build Portable
|
|
|
|
run: |
|
|
|
|
bash --version
|
|
|
|
bash scripts/build.sh --debug --forcefallback --portable --release
|
|
|
|
- name: Package Portables
|
|
|
|
run: |
|
|
|
|
bash scripts/package.sh --version ${INSTALL_REF} --debug --binary --release
|
|
|
|
bash scripts/package.sh --version ${INSTALL_REF} --debug --addons --binary --release
|
|
|
|
- name: Build AppImages
|
|
|
|
run: |
|
|
|
|
bash scripts/appimage.sh --debug --static --version ${INSTALL_REF} --release
|
|
|
|
bash scripts/appimage.sh --debug --nobuild --addons --version ${INSTALL_REF}
|
|
|
|
- name: Upload Files
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
tag_name: ${{ needs.release.outputs.version }}
|
2022-10-11 06:02:12 +02:00
|
|
|
draft: true
|
2022-09-25 22:59:01 +02:00
|
|
|
files: |
|
|
|
|
lite-xl-${{ env.INSTALL_REF }}-linux-x86_64-portable.tar.gz
|
|
|
|
lite-xl-${{ env.INSTALL_REF }}-addons-linux-x86_64-portable.tar.gz
|
|
|
|
LiteXL-${{ env.INSTALL_REF }}-x86_64.AppImage
|
|
|
|
LiteXL-${{ env.INSTALL_REF }}-addons-x86_64.AppImage
|
|
|
|
|
|
|
|
build_macos:
|
2023-01-25 22:28:34 +01:00
|
|
|
name: macOS
|
2022-09-25 22:59:01 +02:00
|
|
|
needs: release
|
|
|
|
runs-on: macos-11
|
2022-10-30 16:48:20 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [x86_64, arm64]
|
2022-09-25 22:59:01 +02:00
|
|
|
env:
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
|
|
|
steps:
|
|
|
|
- name: System Information
|
|
|
|
run: |
|
|
|
|
system_profiler SPSoftwareDataType
|
|
|
|
bash --version
|
|
|
|
gcc -v
|
|
|
|
xcodebuild -version
|
|
|
|
- name: Set Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
|
2022-10-30 16:48:20 +01:00
|
|
|
echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-macos-${{ matrix.arch }}" >> "$GITHUB_ENV"
|
|
|
|
echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-macos-${{ matrix.arch }}" >> "$GITHUB_ENV"
|
2023-04-11 17:33:34 +02:00
|
|
|
if [[ $(uname -m) != ${{ matrix.arch }} ]]; then echo "ARCH=--cross-arch ${{ matrix.arch }}" >> "$GITHUB_ENV"; fi
|
2023-04-07 19:24:27 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Python Setup
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/setup-python@v4
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: bash scripts/install-dependencies.sh --debug
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bash --version
|
2023-04-11 17:33:34 +02:00
|
|
|
bash scripts/build.sh --bundle --debug --forcefallback --release $ARCH
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Create DMG Image
|
|
|
|
run: |
|
2023-04-11 17:33:34 +02:00
|
|
|
bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --dmg --release
|
|
|
|
bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --addons --dmg --release
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: macOS DMG Images
|
|
|
|
path: |
|
|
|
|
${{ env.INSTALL_NAME }}.dmg
|
|
|
|
${{ env.INSTALL_NAME_ADDONS }}.dmg
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Upload Files
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
tag_name: ${{ needs.release.outputs.version }}
|
2022-10-11 06:02:12 +02:00
|
|
|
draft: true
|
2022-09-25 22:59:01 +02:00
|
|
|
files: |
|
|
|
|
${{ env.INSTALL_NAME }}.dmg
|
|
|
|
${{ env.INSTALL_NAME_ADDONS }}.dmg
|
|
|
|
|
2023-04-11 17:33:34 +02:00
|
|
|
build_macos_universal:
|
|
|
|
name: macOS (Universal)
|
|
|
|
needs: [release, build_macos]
|
|
|
|
runs-on: macos-11
|
|
|
|
steps:
|
|
|
|
- name: System Information
|
|
|
|
run: |
|
|
|
|
system_profiler SPSoftwareDataType
|
|
|
|
bash --version
|
|
|
|
gcc -v
|
|
|
|
xcodebuild -version
|
|
|
|
- name: Set Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_BASE=lite-xl-${{ needs.release.outputs.version }}-macos" >> "$GITHUB_ENV"
|
|
|
|
echo "INSTALL_BASE_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-macos" >> "$GITHUB_ENV"
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Download Artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
id: download
|
|
|
|
with:
|
|
|
|
name: macOS DMG Images
|
|
|
|
path: dmgs-original
|
|
|
|
- name: Python Setup
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
2023-11-10 02:44:58 +01:00
|
|
|
- name: Install dmgbuild
|
|
|
|
run: pip install dmgbuild
|
2023-04-11 17:33:34 +02:00
|
|
|
- name: Prepare DMG Images
|
|
|
|
run: |
|
|
|
|
mkdir -p dmgs-addons dmgs-normal
|
|
|
|
mv -v "${{ steps.download.outputs.download-path }}/$INSTALL_BASE-"{x86_64,arm64}.dmg dmgs-normal
|
|
|
|
mv -v "${{ steps.download.outputs.download-path }}/$INSTALL_BASE_ADDONS-"{x86_64,arm64}.dmg dmgs-addons
|
|
|
|
- name: Create Universal DMGs
|
|
|
|
run: |
|
|
|
|
bash --version
|
|
|
|
bash scripts/make-universal-binaries.sh dmgs-normal "$INSTALL_BASE-universal"
|
|
|
|
bash scripts/make-universal-binaries.sh dmgs-addons "$INSTALL_BASE_ADDONS-universal"
|
|
|
|
- name: Upload Files
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
tag_name: ${{ needs.release.outputs.version }}
|
|
|
|
draft: true
|
|
|
|
files: |
|
|
|
|
${{ env.INSTALL_BASE }}-universal.dmg
|
|
|
|
${{ env.INSTALL_BASE_ADDONS }}-universal.dmg
|
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
build_windows_msys2:
|
|
|
|
name: Windows
|
|
|
|
needs: release
|
|
|
|
runs-on: windows-2019
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
msystem: [MINGW32, MINGW64]
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
steps:
|
2023-04-07 19:24:27 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-25 22:59:01 +02:00
|
|
|
- uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.msystem }}
|
|
|
|
update: true
|
|
|
|
install: >-
|
|
|
|
base-devel
|
|
|
|
git
|
|
|
|
zip
|
|
|
|
- name: Set Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
|
|
|
|
if [[ "${MSYSTEM}" == "MINGW64" ]]; then
|
|
|
|
echo "BUILD_ARCH=x86_64" >> "$GITHUB_ENV"
|
|
|
|
echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-windows-x86_64" >> "$GITHUB_ENV"
|
|
|
|
echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-windows-x86_64" >> "$GITHUB_ENV"
|
|
|
|
else
|
|
|
|
echo "BUILD_ARCH=i686" >> "$GITHUB_ENV"
|
|
|
|
echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-windows-i686" >> "$GITHUB_ENV"
|
|
|
|
echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-windows-i686" >> "$GITHUB_ENV"
|
|
|
|
fi
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: bash scripts/install-dependencies.sh --debug
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bash --version
|
|
|
|
bash scripts/build.sh -U --debug --forcefallback --release
|
|
|
|
- name: Package
|
|
|
|
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary --release
|
|
|
|
- name: Build Installer
|
|
|
|
run: bash scripts/innosetup/innosetup.sh --debug --version ${INSTALL_REF}
|
|
|
|
- name: Package With Addons
|
|
|
|
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --addons --binary --release
|
|
|
|
- name: Build Installer With Addons
|
|
|
|
run: bash scripts/innosetup/innosetup.sh --debug --version ${INSTALL_REF} --addons
|
|
|
|
- name: Upload Files
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
tag_name: ${{ needs.release.outputs.version }}
|
2022-10-11 06:02:12 +02:00
|
|
|
draft: true
|
2022-09-25 22:59:01 +02:00
|
|
|
files: |
|
|
|
|
${{ env.INSTALL_NAME }}.zip
|
|
|
|
${{ env.INSTALL_NAME_ADDONS }}.zip
|
|
|
|
LiteXL-${{ env.INSTALL_REF }}-${{ env.BUILD_ARCH }}-setup.exe
|
|
|
|
LiteXL-${{ env.INSTALL_REF }}-addons-${{ env.BUILD_ARCH }}-setup.exe
|