Loading...
Loading...
Guides the user through distributing Tauri applications via CrabNebula Cloud, including pipeline setup, cloud configuration, auto-updates integration, and CI/CD workflows for seamless app distribution.
npx skill4agent add dchuk/claude-code-tauri-skills using-crabnebula-cloud-with-tauriCN_API_KEY# macOS/Linux
curl -L https://cdn.crabnebula.app/install/cn | sh
# Or via cargo
cargo install cn-cli# Create a release draft
cn release draft ORG_SLUG/APP_SLUG VERSION
# Upload assets with Tauri framework detection
cn release upload ORG_SLUG/APP_SLUG RELEASE_ID --framework tauri
# Publish the release
cn release publish ORG_SLUG/APP_SLUG RELEASE_ID
# Fetch latest release info
cn release latest ORG_SLUG/APP_SLUGcn release upload ORG_SLUG/APP_SLUG RELEASE_ID \
--framework tauri \
--channel stable \
--update-platform linux-x86_64 \
--file path/to/binary \
--signature path/to/signature| Flag | Description |
|---|---|
| Auto-detect bundles ( |
| Release channel (must match draft channel) |
| Platform identifier for updates |
| Path to binary asset |
| Path to signature file (required with |
.github/workflows/release.ymlname: Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CN_APPLICATION: "your-org/your-app"
jobs:
draft:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.read-version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Read version from tauri.conf.json
id: read-version
run: |
VERSION=$(jq -r '.version' src-tauri/tauri.conf.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create draft release
uses: crabnebula-dev/cloud-release@v0
with:
command: release draft ${{ env.CN_APPLICATION }} ${{ steps.read-version.outputs.version }} --framework tauri
api-key: ${{ secrets.CN_API_KEY }}
build:
needs: draft
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-22.04
args: ""
- platform: macos-latest
args: "--target aarch64-apple-darwin"
- platform: macos-latest
args: "--target x86_64-apple-darwin"
- platform: windows-latest
args: ""
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install Rust stable
uses: dtolnay/rust-action@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- 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 frontend dependencies
run: npm ci
- name: Build Tauri app
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 }}
with:
args: ${{ matrix.args }}
- name: Upload assets to CrabNebula Cloud
uses: crabnebula-dev/cloud-release@v0
with:
command: release upload ${{ env.CN_APPLICATION }} --framework tauri
api-key: ${{ secrets.CN_API_KEY }}
publish:
needs: [draft, build]
runs-on: ubuntu-latest
steps:
- name: Publish release
uses: crabnebula-dev/cloud-release@v0
with:
command: release publish ${{ env.CN_APPLICATION }} ${{ needs.draft.outputs.version }}
api-key: ${{ secrets.CN_API_KEY }}cargo tauri signer generate -w ~/.tauri/myapp.key~/.tauri/myapp.key~/.tauri/myapp.key.pubTAURI_SIGNING_PRIVATE_KEYmyapp.keyTAURI_SIGNING_PRIVATE_KEY_PASSWORD{
"version": "0.1.0",
"bundle": {
"createUpdaterArtifacts": true
},
"plugins": {
"updater": {
"active": true,
"endpoints": [
"https://cdn.crabnebula.app/update/YOUR_ORG/YOUR_APP/{{target}}-{{arch}}/{{current_version}}"
],
"dialog": true,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk..."
}
}
}{{target}}{{arch}}{{current_version}}"createUpdaterArtifacts": "v1Compatible"/src-tauri/capabilities/main.json{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "main-capability",
"description": "Main capability for the application",
"windows": ["main"],
"permissions": [
"core:default",
"dialog:default",
"updater:default",
"process:default",
"process:allow-restart"
]
}src-tauri/Cargo.toml[dependencies]
tauri-plugin-updater = "2"
tauri-plugin-dialog = "2"
tauri-plugin-process = "2"npm install @tauri-apps/plugin-updater @tauri-apps/plugin-dialog @tauri-apps/plugin-processsrc-tauri/src/lib.rsuse tauri::Manager;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_updater::Builder::new().build())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_process::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}src/updater.tsimport { check } from "@tauri-apps/plugin-updater";
import { ask } from "@tauri-apps/plugin-dialog";
import { relaunch } from "@tauri-apps/plugin-process";
export async function checkForAppUpdates(): Promise<void> {
try {
const update = await check();
if (!update?.available) {
console.log("No update available");
return;
}
const proceed = await ask(
`Version ${update.version} is available!\n\nRelease notes:\n${update.body}`,
{
title: "Update Available",
kind: "info",
okLabel: "Update Now",
cancelLabel: "Later"
}
);
if (proceed) {
console.log("Downloading and installing update...");
await update.downloadAndInstall();
await relaunch();
}
} catch (error) {
console.error("Update check failed:", error);
}
}// React example
import { useEffect } from "react";
import { checkForAppUpdates } from "./updater";
function App() {
useEffect(() => {
checkForAppUpdates();
}, []);
return <div>Your app content</div>;
}# Create draft with channel
cn release draft ORG/APP VERSION --channel beta
# Upload must specify same channel
cn release upload ORG/APP RELEASE_ID --framework tauri --channel betayour-org/your-appyour-org/your-app-beta| Variable | Location | Description |
|---|---|---|
| GitHub Secrets | CrabNebula Cloud API key |
| GitHub Secrets | Contents of private signing key |
| GitHub Secrets | Password for signing key |
| Workflow env | Organization/application slug |
createUpdaterArtifactstrueCN_API_KEYTAURI_SIGNING_PRIVATE_KEY"createUpdaterArtifacts": "v1Compatible"