2021-03-26 14:55:53 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
2021-06-23 16:43:58 +02:00
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2024-10-22 17:53:17 +02:00
|
|
|
- '*'
|
2022-09-25 22:59:01 +02:00
|
|
|
workflow_dispatch:
|
2024-10-22 17:53:17 +02:00
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: Release Version
|
|
|
|
required: false
|
|
|
|
|
|
|
|
# Builds & Uploads:
|
|
|
|
# * Linux x86_64 Portable
|
|
|
|
# * Linux App Image
|
|
|
|
# * Mac Universal Portable
|
|
|
|
# * Mac Universal DMG
|
|
|
|
# * Windows x86_64 Portable
|
|
|
|
# * Windows x86_64 Installer
|
2022-09-25 22:59:01 +02:00
|
|
|
jobs:
|
2024-10-22 17:53:17 +02:00
|
|
|
# Checks to see if we have an input, and stamps that onto the repo.
|
|
|
|
# Determines if this is a release, and determines the official ref.
|
|
|
|
version:
|
|
|
|
name: Compute Version & Check for Release
|
|
|
|
runs-on: ubuntu-latest
|
2021-03-26 14:55:53 +01:00
|
|
|
env:
|
2024-10-22 17:53:17 +02:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
outputs:
|
|
|
|
release: ${{ steps.check_release.outputs.release }}
|
|
|
|
ref: ${{ steps.check_release.outputs.ref }}
|
2024-11-16 07:10:24 +01:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2021-03-26 14:55:53 +01:00
|
|
|
steps:
|
2024-10-22 17:53:17 +02:00
|
|
|
- name: Update Tag
|
|
|
|
uses: richardsimko/update-tag@v1
|
|
|
|
if: ${{ github.event.inputs.version }}
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
2024-10-22 17:53:17 +02:00
|
|
|
tag_name: ${{ github.event.inputs.version }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v4
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
2024-10-22 17:53:17 +02:00
|
|
|
fetch-depth: 0
|
|
|
|
fetch-tags: true
|
|
|
|
- name: Check Release
|
|
|
|
id: check_release
|
|
|
|
run: |
|
|
|
|
export REF=`git describe --match v[0-9]* HEAD --tags`
|
|
|
|
echo "Build Version: $REF"
|
|
|
|
[[ "$REF" != "" ]] && echo "ref=$REF" >> $GITHUB_OUTPUT
|
|
|
|
if [[ `git describe --exact-match --match v[0-9]* HEAD --tags` ]]; then
|
|
|
|
echo "release=$REF" >> $GITHUB_OUTPUT
|
|
|
|
echo "Release Version: $REF"
|
|
|
|
fi
|
|
|
|
|
|
|
|
build_darwin:
|
|
|
|
name: Darwin
|
|
|
|
needs: [version]
|
2024-06-18 05:38:41 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2024-11-16 07:10:24 +01:00
|
|
|
- { runner: macos-13, arch: x86_64-darwin }
|
|
|
|
- { runner: macos-14, arch: aarch64-darwin }
|
2024-06-18 05:38:41 +02:00
|
|
|
runs-on: ${{ matrix.config.runner }}
|
2021-08-09 12:39:03 +02:00
|
|
|
steps:
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: System Information
|
|
|
|
run: |
|
|
|
|
system_profiler SPSoftwareDataType
|
|
|
|
bash --version
|
|
|
|
gcc -v
|
|
|
|
xcodebuild -version
|
2024-10-22 17:53:17 +02:00
|
|
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Python Setup
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/setup-python@v5
|
2024-10-22 17:53:17 +02:00
|
|
|
with: { python-version: "3.11" }
|
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Install Dependencies
|
2024-10-22 17:53:17 +02:00
|
|
|
run: scripts/install-dependencies.sh
|
|
|
|
|
2024-11-16 07:10:24 +01:00
|
|
|
- name: Build & Package Mac (Bundle)
|
|
|
|
run: |
|
|
|
|
scripts/build.sh --addons --debug --forcefallback --reconfigure --bundle -b build
|
|
|
|
tar -C build -czvf lite-xl-${{ needs.version.outputs.ref }}-${{ matrix.config.arch }}-bundle.tar.gz lite-xl Info.plist
|
2024-10-22 17:53:17 +02:00
|
|
|
|
2024-11-16 07:10:24 +01:00
|
|
|
- name: Build & Package Mac (Portable)
|
|
|
|
run: |
|
|
|
|
scripts/build.sh --addons --debug --forcefallback --reconfigure --portable -b build
|
|
|
|
tar -C build -czvf lite-xl-${{ needs.version.outputs.ref }}-${{ matrix.config.arch }}-portable.tar.gz lite-xl
|
2024-10-22 17:53:17 +02:00
|
|
|
|
|
|
|
- name: Upload (Intermediate)
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
2024-11-16 07:10:24 +01:00
|
|
|
name: lite-xl-${{ needs.version.outputs.ref }}-${{ matrix.config.arch }}
|
2024-10-22 17:53:17 +02:00
|
|
|
path: |
|
|
|
|
*.tar.gz
|
2024-11-16 07:10:24 +01:00
|
|
|
|
2024-10-22 17:53:17 +02:00
|
|
|
|
|
|
|
build_darwin_universal:
|
|
|
|
name: Darwin (Universal)
|
|
|
|
needs: [version, build_darwin]
|
2024-06-18 05:38:41 +02:00
|
|
|
runs-on: macos-14
|
2024-10-22 17:53:17 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2024-10-22 17:53:17 +02:00
|
|
|
- name: Python Setup
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/setup-python@v5
|
2024-10-22 17:53:17 +02:00
|
|
|
with: { python-version: "3.11" }
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2024-10-22 17:53:17 +02:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: scripts/install-dependencies.sh
|
|
|
|
|
|
|
|
- name: Download Artifacts
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/download-artifact@v4
|
2023-04-11 17:33:34 +02:00
|
|
|
with:
|
2024-10-22 17:53:17 +02:00
|
|
|
pattern: '*darwin*'
|
2024-11-16 07:10:24 +01:00
|
|
|
merge-multiple: true
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2024-10-22 17:53:17 +02:00
|
|
|
- name: Create Universal Binaries
|
2023-04-11 17:33:34 +02:00
|
|
|
run: |
|
2024-10-22 17:53:17 +02:00
|
|
|
for TYPE in bundle portable; do
|
2024-11-16 07:10:24 +01:00
|
|
|
mkdir -p lite-xl-${{ needs.version.outputs.ref }}-{x86_64,aarch64,universal}-darwin-$TYPE/lite-xl
|
|
|
|
tar -C lite-xl-${{ needs.version.outputs.ref }}-x86_64-darwin-$TYPE -zxvf lite-xl-${{ needs.version.outputs.ref }}-x86_64-darwin-$TYPE.tar.gz
|
|
|
|
tar -C lite-xl-${{ needs.version.outputs.ref }}-aarch64-darwin-$TYPE -zxvf lite-xl-${{ needs.version.outputs.ref }}-aarch64-darwin-$TYPE.tar.gz
|
2024-10-22 17:53:17 +02:00
|
|
|
cp -r lite-xl-${{ needs.version.outputs.ref }}-*-$TYPE/lite-xl/data lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-$TYPE/lite-xl
|
|
|
|
lipo -create -output lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-$TYPE/lite-xl/lite-xl lite-xl-${{ needs.version.outputs.ref }}-*-darwin-$TYPE/lite-xl/lite-xl
|
|
|
|
done
|
|
|
|
cp lite-xl-${{ needs.version.outputs.ref }}-x86_64-darwin-bundle/Info.plist lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-bundle/Info.plist
|
|
|
|
|
|
|
|
- name: Package Darwin (Universal DMG Image)
|
|
|
|
run: scripts/package-dmg.sh lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-bundle lite-xl-${{ needs.version.outputs.ref }}-universal-darwin
|
|
|
|
|
|
|
|
- name: Package Darwin (Universal Portable)
|
|
|
|
run: cd lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-portable && tar -zcvf ../lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-portable.tar.gz *
|
|
|
|
|
|
|
|
- name: Upload (Release)
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-04-11 17:33:34 +02:00
|
|
|
with:
|
2024-10-22 17:53:17 +02:00
|
|
|
name: lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-release
|
|
|
|
path: |
|
2024-11-16 07:10:24 +01:00
|
|
|
lite-xl-${{ needs.version.outputs.ref }}-universal-darwin.dmg
|
|
|
|
lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-portable.tar.gz
|
2024-10-22 17:53:17 +02:00
|
|
|
|
2021-08-09 12:39:03 +02:00
|
|
|
|
2024-10-22 17:53:17 +02:00
|
|
|
build_linux:
|
|
|
|
name: Linux (x86_64)
|
|
|
|
needs: [version]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
BUILDER: docker run -v .:/build -w /build ghcr.io/lite-xl/lite-xl-build-box-manylinux:v3.0.2 -- /entrypoint.sh
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: $BUILDER scripts/build.sh --addons --debug --forcefallback --portable -b build
|
|
|
|
|
|
|
|
- name: Package Linux (Portable)
|
|
|
|
run: cd build && tar -czvf ../lite-xl-${{ needs.version.outputs.ref }}-x86_64-linux-portable.tar.gz lite-xl && cd ..
|
|
|
|
|
|
|
|
- name: Package Linux (AppImage)
|
|
|
|
run: $BUILDER scripts/package-appimage.sh --debug --version ${{ needs.version.outputs.ref }} -b build
|
|
|
|
|
|
|
|
- name: Upload (Release)
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: lite-xl-${{ needs.version.outputs.ref }}-x86_64-linux-portable-release
|
|
|
|
path: |
|
|
|
|
*.tar.gz
|
|
|
|
*.AppImage
|
|
|
|
|
|
|
|
|
|
|
|
build_windows:
|
|
|
|
name: Windows (x86_64) (MSYS)
|
2021-08-09 12:39:03 +02:00
|
|
|
runs-on: windows-2019
|
2024-10-22 17:53:17 +02:00
|
|
|
defaults:
|
2021-08-09 12:39:03 +02:00
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
2024-10-22 17:53:17 +02:00
|
|
|
needs: [version]
|
2021-08-09 12:39:03 +02:00
|
|
|
steps:
|
2024-10-22 17:53:17 +02:00
|
|
|
- uses: msys2/setup-msys2@v2
|
|
|
|
with: { msystem: MINGW64 }
|
|
|
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
2024-06-07 04:08:12 +02:00
|
|
|
- name: Install Dependencies
|
2024-10-22 17:53:17 +02:00
|
|
|
run: bash scripts/install-dependencies.sh
|
|
|
|
|
2024-06-07 04:08:12 +02:00
|
|
|
- name: Build
|
2024-11-16 07:10:24 +01:00
|
|
|
run: bash scripts/build.sh --addons --debug --forcefallback --portable -b build
|
2024-10-22 17:53:17 +02:00
|
|
|
|
|
|
|
- name: Package Windows (Portable)
|
|
|
|
run: cd build && zip -r ../lite-xl-${{ needs.version.outputs.ref }}-x86_64-windows-portable.zip lite-xl && cd ..
|
|
|
|
|
|
|
|
- name: Package Windows (InnoSetup)
|
|
|
|
run: bash scripts/package-innosetup.sh --debug --version ${{ needs.version.outputs.ref }} -b build
|
|
|
|
|
|
|
|
- name: Upload (Release)
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-10-22 17:53:17 +02:00
|
|
|
name: lite-xl-${{ needs.version.outputs.ref }}-x86_64-windows-portable-release
|
|
|
|
path: |
|
|
|
|
*.zip
|
|
|
|
*.exe
|
2022-11-16 04:23:45 +01:00
|
|
|
|
2024-11-16 07:10:24 +01:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
build_windows_msvc:
|
2024-10-22 17:53:17 +02:00
|
|
|
name: Windows (x86_64) (MSVC)
|
|
|
|
needs: [version]
|
2022-11-16 04:23:45 +01:00
|
|
|
runs-on: windows-2019
|
|
|
|
steps:
|
2024-10-22 17:53:17 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-06-07 04:08:12 +02:00
|
|
|
|
|
|
|
- name: Setup MSVC
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
2022-11-16 04:23:45 +01:00
|
|
|
with:
|
2024-10-22 17:53:17 +02:00
|
|
|
arch: x86_64
|
2024-06-07 04:08:12 +02:00
|
|
|
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v5
|
2024-10-22 17:53:17 +02:00
|
|
|
with: { python-version: "3.11" }
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
- name: Install meson and ninja
|
|
|
|
run: pip install meson ninja
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2023-10-20 03:09:51 +02:00
|
|
|
- name: Configure
|
2024-10-22 17:53:17 +02:00
|
|
|
run: meson setup --wrap-mode=forcefallback build
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
- name: Build
|
2024-11-16 07:10:24 +01:00
|
|
|
run: meson install -C build --skip-subprojects --destdir="../lite-xl"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
- name: Package
|
2024-11-16 07:10:24 +01:00
|
|
|
shell: powershell {0}
|
|
|
|
run: Compress-Archive -Path lite-xl -DestinationPath "lite-xl-${{ needs.version.outputs.ref }}-x86_64-windows.zip"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2024-10-22 17:53:17 +02:00
|
|
|
- name: Upload Artifacts (Intermediate)
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-11-16 04:23:45 +01:00
|
|
|
with:
|
2024-10-22 17:53:17 +02:00
|
|
|
name: lite-xl-${{ needs.version.outputs.ref }}-x86_64-windows (MSVC)
|
2024-06-07 04:08:12 +02:00
|
|
|
compression-level: 0
|
2024-10-22 17:53:17 +02:00
|
|
|
path: |
|
|
|
|
*.zip
|
|
|
|
|
|
|
|
|
|
|
|
release:
|
|
|
|
name: Create Release
|
|
|
|
needs: [version, build_linux, build_windows, build_darwin_universal]
|
|
|
|
runs-on: ubuntu-latest
|
2024-11-16 07:10:24 +01:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2024-10-22 17:53:17 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download Artifacts
|
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
pattern: lite-xl-*-release
|
2024-11-16 07:10:24 +01:00
|
|
|
merge-multiple: true
|
|
|
|
path: releases
|
|
|
|
- name: Generate Release Notes
|
|
|
|
if: needs.version.outputs.release
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
run: bash scripts/generate-release-notes.sh --version ${{ needs.version.outputs.release }}
|
2024-10-22 17:53:17 +02:00
|
|
|
- name: Versioned Release
|
2024-11-16 07:10:24 +01:00
|
|
|
uses: ncipollo/release-action@v1
|
2024-10-22 17:53:17 +02:00
|
|
|
if: ${{ needs.version.outputs.release }}
|
|
|
|
with:
|
2024-11-16 07:10:24 +01:00
|
|
|
tag: ${{ needs.version.outputs.release }}
|
2024-10-22 17:53:17 +02:00
|
|
|
name: Lite XL ${{ needs.version.outputs.release }}
|
|
|
|
draft: true
|
2024-11-16 07:10:24 +01:00
|
|
|
allowUpdates: true
|
|
|
|
bodyFile: release-notes.md
|
|
|
|
artifacts: "releases/*.*"
|
2024-10-22 17:53:17 +02:00
|
|
|
- name: Update Tag
|
|
|
|
uses: richardsimko/update-tag@v1
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
with:
|
|
|
|
tag_name: continuous
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Continuous Release
|
2024-11-16 07:10:24 +01:00
|
|
|
uses: ncipollo/release-action@v1
|
2024-10-22 17:53:17 +02:00
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
with:
|
|
|
|
name: Lite XL Continuous Release
|
2024-11-16 07:10:24 +01:00
|
|
|
tag: continuous
|
2024-10-22 17:53:17 +02:00
|
|
|
prerelease: true
|
2024-11-16 07:10:24 +01:00
|
|
|
allowUpdates: true
|
|
|
|
removeArtifacts: true
|
|
|
|
generateReleaseNotes: true
|
|
|
|
artifacts: "releases/*.*"
|