Skip to content

feat: add Tauri CI workflow for building and releasing #1

feat: add Tauri CI workflow for building and releasing

feat: add Tauri CI workflow for building and releasing #1

Workflow file for this run

name: Build and Release Tauri App

Check failure on line 1 in .github/workflows/tauri.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tauri.yml

Invalid workflow file

(Line: 26, Col: 14): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found., (Line: 70, Col: 9): Unexpected value 'uses', (Line: 79, Col: 9): Unexpected value 'with', (Line: 68, Col: 9): Required property is missing: run, (Line: 119, Col: 9): Unexpected value 'uses', (Line: 122, Col: 9): Unexpected value 'with', (Line: 117, Col: 9): Required property is missing: run, (Line: 170, Col: 9): Unexpected value 'uses', (Line: 173, Col: 9): Unexpected value 'with', (Line: 168, Col: 9): Required property is missing: run
on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:
env:
NODE_VERSION: '20'
RUST_VERSION: '1.75'
LUMIS_REPO: 'melandlabs/lumis'
jobs:
build-tauri-macos:
permissions:
contents: write
runs-on: macos-latest
steps:
- name: Checkout release repo
uses: actions/checkout@v4
- name: Clone lumis source code
run: |
git clone https://github.com/${{ env.LUMIS_REPO }.git lumis
cd lumis
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Setup Rust
uses: dtolnay/rust-action@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: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Get pnpm store directory
shell: bash
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: Build Tauri app (Apple Silicon)
working-directory: ./lumis/apps/web
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
tagName: v__VERSION__
releaseName: 'Lumis v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: --target aarch64-apple-darwin
build-tauri-windows:
runs-on: windows-latest
steps:
- name: Checkout release repo
uses: actions/checkout@v4
- name: Clone lumis source code
run: |
git clone https://github.com/${{ env.LUMIS_REPO }}.git lumis
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Setup Rust
uses: dtolnay/rust-action@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
working-directory: ./lumis
run: pnpm install --frozen-lockfile
- name: Build Tauri app (Windows)
working-directory: ./lumis/apps/web
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: v__VERSION__
releaseName: 'Lumis v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
build-tauri-linux:
runs-on: ubuntu-22.04
steps:
- name: Checkout release repo
uses: actions/checkout@v4
- name: Clone lumis source code
run: |
git clone https://github.com/${{ env.LUMIS_REPO }}.git lumis
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Setup Rust
uses: dtolnay/rust-action@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install Rust target
run: |
rustup target add x86_64-unknown-linux-gnu
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
working-directory: ./lumis
run: pnpm install --frozen-lockfile
- 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
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: v__VERSION__
releaseName: 'Lumis v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: --target x86_64-unknown-linux-gnu