Fix multiple continuous release binaries (#1948)
* ci,scripts: remove unused lua patching code * ci: remove old continuous release binaries * ci: generate release notes when releasing with tags * ci: remove the unicode patch flag * ci: add content: write permission to GH_TOKEN * ci: use ncipollo/release-action@v1 * ci: update existing releases * ci: actually set removeArtifacts to true * ci: do not rebuild for both bundle and portable We now allow using meson setup --reconfigure, which will preserve the build cache, and changes nothing but the installation path * build.sh: fix wrong conditional * ci: fix tar command output * ci: fix tar command extracting to wrong directory * ci: add merge-multiple: true to properly lay out the artifacts * ci: only upload the correct files
This commit is contained in:
parent
c15910856a
commit
7d457f8fc5
|
@ -29,6 +29,8 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
release: ${{ steps.check_release.outputs.release }}
|
release: ${{ steps.check_release.outputs.release }}
|
||||||
ref: ${{ steps.check_release.outputs.ref }}
|
ref: ${{ steps.check_release.outputs.ref }}
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Update Tag
|
- name: Update Tag
|
||||||
uses: richardsimko/update-tag@v1
|
uses: richardsimko/update-tag@v1
|
||||||
|
@ -58,10 +60,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- { runner: macos-13, type: bundle, arch: x86_64-darwin }
|
- { runner: macos-13, arch: x86_64-darwin }
|
||||||
- { runner: macos-13, type: portable, arch: x86_64-darwin }
|
- { runner: macos-14, arch: aarch64-darwin }
|
||||||
- { runner: macos-14, type: bundle, arch: aarch64-darwin }
|
|
||||||
- { runner: macos-14, type: portable, arch: aarch64-darwin }
|
|
||||||
runs-on: ${{ matrix.config.runner }}
|
runs-on: ${{ matrix.config.runner }}
|
||||||
steps:
|
steps:
|
||||||
- name: System Information
|
- name: System Information
|
||||||
|
@ -80,21 +80,20 @@ jobs:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: scripts/install-dependencies.sh
|
run: scripts/install-dependencies.sh
|
||||||
|
|
||||||
- name: Build
|
- name: Build & Package Mac (Bundle)
|
||||||
run: scripts/build.sh --addons --debug --forcefallback --${{ matrix.config.type }} -b build
|
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
|
||||||
|
|
||||||
- name: Package Mac (Bundle)
|
- name: Build & Package Mac (Portable)
|
||||||
if: ${{ matrix.config.type == 'bundle' }}
|
run: |
|
||||||
run: cd build && tar -czvf ../lite-xl-${{ needs.version.outputs.ref }}-${{ matrix.config.arch }}}-${{ matrix.config.type }}.tar.gz lite-xl Info.plist
|
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
|
||||||
- name: Package Mac (Portable)
|
|
||||||
if: ${{ matrix.config.type == 'portable' }}
|
|
||||||
run: cd build && tar -czvf ../lite-xl-${{ needs.version.outputs.ref }}-${{ matrix.config.arch }}}-${{ matrix.config.type }}.tar.gz lite-xl
|
|
||||||
|
|
||||||
- name: Upload (Intermediate)
|
- name: Upload (Intermediate)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: lite-xl-${{ needs.version.outputs.ref }}-${{ matrix.config.arch }}-${{ matrix.config.type }}
|
name: lite-xl-${{ needs.version.outputs.ref }}-${{ matrix.config.arch }}
|
||||||
path: |
|
path: |
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
|
||||||
|
@ -117,12 +116,14 @@ jobs:
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: '*darwin*'
|
pattern: '*darwin*'
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Create Universal Binaries
|
- name: Create Universal Binaries
|
||||||
run: |
|
run: |
|
||||||
for TYPE in bundle portable; do
|
for TYPE in bundle portable; do
|
||||||
mkdir -p lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-$TYPE/lite-xl
|
mkdir -p lite-xl-${{ needs.version.outputs.ref }}-{x86_64,aarch64,universal}-darwin-$TYPE/lite-xl
|
||||||
cd lite-xl-${{ needs.version.outputs.ref }}-x86_64-darwin-$TYPE && tar -zxvf *.tar.gz && cd .. && cd lite-xl-${{ needs.version.outputs.ref }}-aarch64-darwin-$TYPE && tar -zxvf *.tar.gz && cd ..
|
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
|
||||||
cp -r lite-xl-${{ needs.version.outputs.ref }}-*-$TYPE/lite-xl/data lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-$TYPE/lite-xl
|
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
|
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
|
done
|
||||||
|
@ -139,8 +140,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-release
|
name: lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-release
|
||||||
path: |
|
path: |
|
||||||
*.dmg
|
lite-xl-${{ needs.version.outputs.ref }}-universal-darwin.dmg
|
||||||
*.tar.gz
|
lite-xl-${{ needs.version.outputs.ref }}-universal-darwin-portable.tar.gz
|
||||||
|
|
||||||
|
|
||||||
build_linux:
|
build_linux:
|
||||||
|
@ -187,7 +188,7 @@ jobs:
|
||||||
run: bash scripts/install-dependencies.sh
|
run: bash scripts/install-dependencies.sh
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bash scripts/build.sh -U --addons --debug --forcefallback --portable -b build
|
run: bash scripts/build.sh --addons --debug --forcefallback --portable -b build
|
||||||
|
|
||||||
- name: Package Windows (Portable)
|
- name: Package Windows (Portable)
|
||||||
run: cd build && zip -r ../lite-xl-${{ needs.version.outputs.ref }}-x86_64-windows-portable.zip lite-xl && cd ..
|
run: cd build && zip -r ../lite-xl-${{ needs.version.outputs.ref }}-x86_64-windows-portable.zip lite-xl && cd ..
|
||||||
|
@ -203,6 +204,7 @@ jobs:
|
||||||
*.zip
|
*.zip
|
||||||
*.exe
|
*.exe
|
||||||
|
|
||||||
|
|
||||||
build_windows_msvc:
|
build_windows_msvc:
|
||||||
name: Windows (x86_64) (MSVC)
|
name: Windows (x86_64) (MSVC)
|
||||||
needs: [version]
|
needs: [version]
|
||||||
|
@ -222,25 +224,15 @@ jobs:
|
||||||
- name: Install meson and ninja
|
- name: Install meson and ninja
|
||||||
run: pip install meson ninja
|
run: pip install meson ninja
|
||||||
|
|
||||||
- name: Set up environment variables
|
|
||||||
run: |
|
|
||||||
"LUA_SUBPROJECT_PATH=subprojects/$(awk -F ' *= *' '/directory/ { printf $2 }' subprojects/lua.wrap)" >> $env:GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Download subprojects
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
meson subprojects download
|
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: meson setup --wrap-mode=forcefallback build
|
run: meson setup --wrap-mode=forcefallback build
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: meson install -C build --destdir="../lite-xl"
|
run: meson install -C build --skip-subprojects --destdir="../lite-xl"
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: |
|
shell: powershell {0}
|
||||||
Remove-Item -Recurse -Force -Path "lite-xl/lib","lite-xl/include"
|
run: Compress-Archive -Path lite-xl -DestinationPath "lite-xl-${{ needs.version.outputs.ref }}-x86_64-windows.zip"
|
||||||
Compress-Archive -Path lite-xl -DestinationPath "lite-xl-${{ needs.version.outputs.ref }}-x86_64-windows.zip"
|
|
||||||
|
|
||||||
- name: Upload Artifacts (Intermediate)
|
- name: Upload Artifacts (Intermediate)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
@ -255,28 +247,31 @@ jobs:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
needs: [version, build_linux, build_windows, build_darwin_universal]
|
needs: [version, build_linux, build_windows, build_darwin_universal]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: lite-xl-*-release
|
pattern: lite-xl-*-release
|
||||||
path: .
|
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 }}
|
||||||
- name: Versioned Release
|
- name: Versioned Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: ncipollo/release-action@v1
|
||||||
if: ${{ needs.version.outputs.release }}
|
if: ${{ needs.version.outputs.release }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ needs.version.outputs.release }}
|
tag: ${{ needs.version.outputs.release }}
|
||||||
name: Lite XL ${{ needs.version.outputs.release }}
|
name: Lite XL ${{ needs.version.outputs.release }}
|
||||||
draft: true
|
draft: true
|
||||||
body_path: changelog.md
|
allowUpdates: true
|
||||||
generate_release_notes: true
|
bodyFile: release-notes.md
|
||||||
files: |
|
artifacts: "releases/*.*"
|
||||||
*/*.tar.gz
|
|
||||||
*/*.zip
|
|
||||||
*/*.exe
|
|
||||||
*/*.dmg
|
|
||||||
*/*.AppImage
|
|
||||||
- name: Update Tag
|
- name: Update Tag
|
||||||
uses: richardsimko/update-tag@v1
|
uses: richardsimko/update-tag@v1
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
@ -285,15 +280,13 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Continuous Release
|
- name: Continuous Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: ncipollo/release-action@v1
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
with:
|
with:
|
||||||
name: Lite XL Continuous Release
|
name: Lite XL Continuous Release
|
||||||
tag_name: continuous
|
tag: continuous
|
||||||
prerelease: true
|
prerelease: true
|
||||||
files: |
|
allowUpdates: true
|
||||||
*/*.tar.gz
|
removeArtifacts: true
|
||||||
*/*.zip
|
generateReleaseNotes: true
|
||||||
*/*.exe
|
artifacts: "releases/*.*"
|
||||||
*/*.dmg
|
|
||||||
*/*.AppImage
|
|
||||||
|
|
|
@ -23,8 +23,9 @@ show_help() {
|
||||||
echo "-B --bundle Create an App bundle (macOS only)"
|
echo "-B --bundle Create an App bundle (macOS only)"
|
||||||
echo "-A --addons Add in addons"
|
echo "-A --addons Add in addons"
|
||||||
echo "-P --portable Create a portable binary package."
|
echo "-P --portable Create a portable binary package."
|
||||||
|
echo "-r --reconfigure Tries to reuse the meson build directory, if possible."
|
||||||
|
echo " Default: Deletes the build directory and recreates it."
|
||||||
echo "-O --pgo Use profile guided optimizations (pgo)."
|
echo "-O --pgo Use profile guided optimizations (pgo)."
|
||||||
echo "-U --windows-lua-utf Use the UTF8 patch for Lua."
|
|
||||||
echo " macOS: disabled when used with --bundle,"
|
echo " macOS: disabled when used with --bundle,"
|
||||||
echo " Windows: Implicit being the only option."
|
echo " Windows: Implicit being the only option."
|
||||||
echo " --cross-platform PLATFORM Cross compile for this platform."
|
echo " --cross-platform PLATFORM Cross compile for this platform."
|
||||||
|
@ -49,13 +50,12 @@ main() {
|
||||||
local bundle
|
local bundle
|
||||||
local portable
|
local portable
|
||||||
local pgo
|
local pgo
|
||||||
local patch_lua
|
|
||||||
local cross
|
local cross
|
||||||
local cross_platform
|
local cross_platform
|
||||||
local cross_arch
|
local cross_arch
|
||||||
local cross_file
|
local cross_file
|
||||||
|
local reconfigure
|
||||||
local lua_subproject_path
|
local should_reconfigure
|
||||||
|
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
case $i in
|
case $i in
|
||||||
|
@ -72,6 +72,10 @@ main() {
|
||||||
build_type="debug"
|
build_type="debug"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-r|--reconfigure)
|
||||||
|
should_reconfigure=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--debug)
|
--debug)
|
||||||
set -x
|
set -x
|
||||||
shift
|
shift
|
||||||
|
@ -105,10 +109,6 @@ main() {
|
||||||
pgo="-Db_pgo=generate"
|
pgo="-Db_pgo=generate"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-U|--windows-lua-utf)
|
|
||||||
patch_lua="true"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--cross-arch)
|
--cross-arch)
|
||||||
cross="true"
|
cross="true"
|
||||||
cross_arch="$2"
|
cross_arch="$2"
|
||||||
|
@ -186,12 +186,10 @@ main() {
|
||||||
export LDFLAGS="-mmacosx-version-min=$macos_version_min"
|
export LDFLAGS="-mmacosx-version-min=$macos_version_min"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $should_reconfigure == true ]] && [[ -d "${build_dir}" ]]; then
|
||||||
|
reconfigure="--reconfigure"
|
||||||
|
elif [[ -d "${build_dir}" ]]; then
|
||||||
rm -rf "${build_dir}"
|
rm -rf "${build_dir}"
|
||||||
|
|
||||||
if [[ $patch_lua == "true" ]] && [[ ! -z $force_fallback ]]; then
|
|
||||||
# download the subprojects so we can start patching before configure.
|
|
||||||
# this will prevent reconfiguring the project.
|
|
||||||
meson subprojects download
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS meson setup \
|
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS meson setup \
|
||||||
|
@ -203,6 +201,7 @@ main() {
|
||||||
$bundle \
|
$bundle \
|
||||||
$portable \
|
$portable \
|
||||||
$pgo \
|
$pgo \
|
||||||
|
$reconfigure
|
||||||
|
|
||||||
meson compile -C "${build_dir}"
|
meson compile -C "${build_dir}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue