Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "windows-latest"
args: ""
bridge-target: "node22-win-x64"
bridge-output: "bridge-x86_64-pc-windows-msvc.exe"
- platform: "ubuntu-22.04"
args: ""
bridge-target: "node22-linux-x64"
bridge-output: "bridge-x86_64-unknown-linux-gnu"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build bridge
run: |
cd bridge
pnpm install --frozen-lockfile
npm rebuild better-sqlite3
npx esbuild src/index.ts --bundle --platform=node --outfile=dist/index.cjs --format=cjs --packages=external
cd ..
node ./bridge/scripts/copy-native.js
npx @yao-pkg/pkg ./bridge/dist/index.cjs --target ${{ matrix.bridge-target }} --output ./src-tauri/resources/${{ matrix.bridge-output }}
- name: Mark bridge executable (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: chmod +x ./src-tauri/resources/${{ matrix.bridge-output }}
- name: Verify sidecar binary
shell: bash
run: ls -la src-tauri/resources/
- name: Build and release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
VITE_TLDRAW_LICENSE_KEY: ${{ secrets.VITE_TLDRAW_LICENSE_KEY }}
with:
tagName: v__VERSION__
releaseName: "RelWave v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}