mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-12-23 10:11:57 +00:00
93 lines
2.9 KiB
YAML
93 lines
2.9 KiB
YAML
name: 'Publish Flare'
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '15 23 * * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
debug:
|
|
description: 'If set to true, a debug build will be created.'
|
|
required: true
|
|
default: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
publish-linux-appimage:
|
|
permissions:
|
|
contents: write
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Install Linux dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libappindicator3-dev librsvg2-dev patchelf libxdo-dev \
|
|
libwebkit2gtk-4.1-0=2.44.0-2 \
|
|
libwebkit2gtk-4.1-dev=2.44.0-2 \
|
|
libjavascriptcoregtk-4.1-0=2.44.0-2 \
|
|
libjavascriptcoregtk-4.1-dev=2.44.0-2 \
|
|
gir1.2-javascriptcoregtk-4.1=2.44.0-2 \
|
|
gir1.2-webkit2-4.1=2.44.0-2
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
|
|
- name: Copy Swift files
|
|
run: |
|
|
cp /usr/share/swift/usr/lib/swift/linux/*.so src-tauri/SoulverWrapper/Vendor/SoulverCore-linux
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: 'pnpm'
|
|
cache-dependency-path: ./pnpm-lock.yaml
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache Rust dependencies
|
|
uses: swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: './src-tauri -> target'
|
|
|
|
- name: Determine Build Profile
|
|
id: build_profile
|
|
run: |
|
|
if [[ "${{ github.event.inputs.debug }}" == "true" ]]; then
|
|
echo "profile=debug" >> $GITHUB_OUTPUT
|
|
echo "artifact_suffix=-debug" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "profile=release" >> $GITHUB_OUTPUT
|
|
echo "artifact_suffix=" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Install project dependencies
|
|
run: pnpm install
|
|
|
|
- name: Build the sidecar binary
|
|
run: pnpm --filter sidecar build
|
|
|
|
- name: Build Swift wrapper
|
|
run: swift build -c release --package-path src-tauri/SoulverWrapper
|
|
|
|
- name: Build AppImage
|
|
run: |
|
|
BUILD_ARGS="--verbose --bundles appimage"
|
|
if [[ "${{ steps.build_profile.outputs.profile }}" == "debug" ]]; then
|
|
BUILD_ARGS="$BUILD_ARGS --debug"
|
|
fi
|
|
pnpm tauri build $BUILD_ARGS
|
|
env:
|
|
LD_LIBRARY_PATH: ${{ github.workspace }}/src-tauri/SoulverWrapper/.build/${{ steps.build_profile.outputs.profile }}:${{ github.workspace }}/src-tauri/SoulverWrapper/Vendor/SoulverCore-linux
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: flare${{ steps.build_profile.outputs.artifact_suffix }}
|
|
path: src-tauri/target/${{ steps.build_profile.outputs.profile }}/bundle/appimage/*.AppImage
|
|
retention-days: 7
|
|
compression-level: 0
|