Skip to content

Bump rc.21 — GitHub-as-transport pivot #22

Bump rc.21 — GitHub-as-transport pivot

Bump rc.21 — GitHub-as-transport pivot #22

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
# Required so the default GITHUB_TOKEN can create the GitHub Release that
# tauri-action uploads artifacts to.
permissions:
contents: write
jobs:
release:
name: Build ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target universal-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: 'desktop/src-tauri -> target'
- 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: Install npm dependencies
run: npm ci
- name: Build Obsidian plugin
run: npm run build:plugin
# On macOS we ship a universal-apple-darwin .dmg. Tauri builds the main
# binary as universal but does NOT auto-build secondary [[bin]] entries
# for both archs — they're expected to already exist at the universal
# target path. So we build git-remote-interbrain for each arch and lipo
# them together before tauri-action runs.
#
# Tauri's build.rs validates bundle.resources paths at compile time,
# so we must run copy-plugin-resources first to populate
# desktop/src-tauri/resources/plugin/ before any cargo build.
- name: Stage plugin resources for Tauri (macOS only)
if: matrix.platform == 'macos-latest'
working-directory: desktop
run: node scripts/copy-plugin-resources.mjs
- name: Build helper binary as universal (macOS only)
if: matrix.platform == 'macos-latest'
working-directory: desktop/src-tauri
run: |
cargo build --release --bin git-remote-interbrain --target aarch64-apple-darwin
cargo build --release --bin git-remote-interbrain --target x86_64-apple-darwin
mkdir -p target/universal-apple-darwin/release
lipo -create \
target/aarch64-apple-darwin/release/git-remote-interbrain \
target/x86_64-apple-darwin/release/git-remote-interbrain \
-output target/universal-apple-darwin/release/git-remote-interbrain
- name: Build & release Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./desktop
tagName: ${{ github.ref_name }}
releaseName: 'InterBrain ${{ github.ref_name }}'
releaseBody: |
Pre-release Tauri companion build for cross-platform install testing.
Not code-signed; expect OS warnings on first launch.
Internal use — not yet a public release.
# Publish as a prerelease (not "Latest") so assets are immediately
# public-downloadable. Drafts hide assets behind repo collab auth,
# which we don't want for cross-machine install testing.
releaseDraft: false
prerelease: true
args: ${{ matrix.args }}
includeUpdaterJson: false