Add cross-platform build and release workflows
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
TYPST_COMMIT: 44b3f78ed37fedea75e911dde2269ef86c45316f
|
||||
|
||||
jobs:
|
||||
frontend:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Type check
|
||||
run: bun run check
|
||||
|
||||
- name: Build
|
||||
run: bun run build
|
||||
|
||||
backend:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: typst-desktop
|
||||
|
||||
- name: Clone Typst compiler
|
||||
run: |
|
||||
git clone https://github.com/typst/typst.git typstdrive/typst
|
||||
git -C typstdrive/typst checkout "$TYPST_COMMIT"
|
||||
|
||||
- name: Install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libssl-dev
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Cache cargo
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: typst-desktop/src-tauri
|
||||
|
||||
- name: Check
|
||||
working-directory: typst-desktop/src-tauri
|
||||
run: cargo check
|
||||
Reference in New Issue
Block a user