Skip to content

chore: remove Apple signing and Windows build #23

chore: remove Apple signing and Windows build

chore: remove Apple signing and Windows build #23

Workflow file for this run

name: Build and Release Tauri App
on:
push:
branches:
- main
workflow_dispatch:
inputs:
tag:
description: 'Version tag (e.g., v0.3.0)'
required: false
type: string
env:
NODE_VERSION: '20'
RUST_VERSION: 'stable'
LUMIS_REPO: 'melandlabs/lumis'
jobs:
get-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
checkout_ref: ${{ steps.version.outputs.checkout_ref }}
steps:
- id: version
run: |
if [ "${{ github.event.inputs.tag }}" != "" ]; then
echo "version=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
echo "checkout_ref=refs/tags/${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "version=0.0.0-test" >> $GITHUB_OUTPUT
echo "checkout_ref=refs/heads/main" >> $GITHUB_OUTPUT
fi
build-tauri-macos:
needs: get-version
if: needs.get-version.outputs.version != ''
runs-on: macos-latest
steps:
- name: Checkout release repo
uses: actions/checkout@v4
- name: Clone lumis source code
run: |
git clone https://x-access-token:${{ secrets.LUMIS_TOKEN }}@github.com/${{ env.LUMIS_REPO }}.git lumis
cd lumis
git checkout ${{ needs.get-version.outputs.checkout_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Add pnpm to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PNPM_HOME=$HOME/.local" >> $GITHUB_ENV
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install Rust targets
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: Get pnpm store directory
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('lumis/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: ./lumis
run: pnpm install --frozen-lockfile
- name: Create .env file
working-directory: ./lumis/apps/web
run: |
cp .env.example .env
# Remove POSTGRES_URL to skip database migration in CI
grep -v '^POSTGRES_URL=' .env > .env.tmp && mv .env.tmp .env
- name: Build Tauri app (Apple Silicon)
working-directory: ./lumis/apps/web
run: pnpm tauri:build
- name: Find DMG file
id: dmg
working-directory: ./lumis/apps/web/src-tauri/target/release/bundle/dmg
run: echo "path=$(ls Lumis*.dmg)" >> $GITHUB_OUTPUT
- name: Upload Apple Silicon DMG
uses: actions/upload-artifact@v4
with:
name: lumis-dmg-arm64
path: ./lumis/apps/web/src-tauri/target/release/bundle/dmg/${{ steps.dmg.outputs.path }}
build-tauri-linux:
needs: get-version
if: needs.get-version.outputs.version != ''
runs-on: ubuntu-22.04
steps:
- name: Checkout release repo
uses: actions/checkout@v4
- name: Clone lumis source code
run: |
git clone https://x-access-token:${{ secrets.LUMIS_TOKEN }}@github.com/${{ env.LUMIS_REPO }}.git lumis
cd lumis
git checkout ${{ needs.get-version.outputs.checkout_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Add pnpm to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PNPM_HOME=$HOME/.local" >> $GITHUB_ENV
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install Rust target
run: |
rustup target add x86_64-unknown-linux-gnu
- name: Install dependencies
working-directory: ./lumis
run: pnpm install --frozen-lockfile
- name: Create .env file
working-directory: ./lumis/apps/web
run: |
cp .env.example .env
# Remove POSTGRES_URL to skip database migration in CI
grep -v '^POSTGRES_URL=' .env > .env.tmp && mv .env.tmp .env
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Build Tauri app (Linux)
working-directory: ./lumis/apps/web
run: pnpm tauri:build
- name: Find deb file
id: deb
working-directory: ./lumis/apps/web/src-tauri/target/release/bundle/deb
run: echo "path=$(ls lumis*.deb)" >> $GITHUB_OUTPUT
- name: Upload Linux deb
uses: actions/upload-artifact@v4
with:
name: lumis-linux
path: ./lumis/apps/web/src-tauri/target/release/bundle/deb/${{ steps.deb.outputs.path }}
release:
needs: [get-version, build-tauri-macos, build-tauri-linux]
if: needs.get-version.outputs.version != ''
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Apple Silicon DMG
uses: actions/download-artifact@v4
with:
name: lumis-dmg-arm64
- name: Download Linux deb
uses: actions/download-artifact@v4
with:
name: lumis-linux
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.get-version.outputs.version }}
name: 'Lumis ${{ needs.get-version.outputs.version }}'
body: 'See the assets to download this version and install.'
draft: true
files: |
Lumis*.dmg
lumis*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}