refactor: implement autostart setup and add Windows build workflow
Build Windows / Build .exe (Windows) (push) Canceled after 0s

This commit is contained in:
vitalii.litvinchuk
2026-09-18 11:39:25 +03:00
parent ac827c492f
commit 50611c489b
2 changed files with 73 additions and 2 deletions
+59
View File
@@ -0,0 +1,59 @@
name: Build Windows
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-windows:
name: Build .exe (Windows)
runs-on: windows-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🟢 Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: 🦕 Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: 🦀 Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: 📦 Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: 📦 Install npm deps
run: npm ci
- name: 🔨 Build Tauri (Windows)
run: npm run tauri build
env:
TAURI_SIGNING_PRIVATE_KEY: ""
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ""
- name: 📤 Upload portable .exe
uses: actions/upload-artifact@v4
with:
name: Tauri-Launcher-windows
path: |
src-tauri/target/release/tauri-app.exe
src-tauri/target/release/bundle/nsis/*.exe
src-tauri/target/release/bundle/msi/*.msi
if-no-files-found: warn
retention-days: 14
+14 -2
View File
@@ -1,8 +1,20 @@
/* @refresh reload */
import { render } from "solid-js/web";
import App from "./App";
import { enable } from "@tauri-apps/plugin-autostart";
import { enable, isEnabled } from "@tauri-apps/plugin-autostart";
await enable();
async function setupAutostart() {
if (!import.meta.env.PROD) return;
try {
if (!(await isEnabled())) {
await enable();
}
} catch (e) {
console.error("autostart:", e);
}
}
await setupAutostart();
render(() => <App />, document.getElementById("root") as HTMLElement);