Skip to content

Build and Release Desktop #11

Build and Release Desktop

Build and Release Desktop #11

Workflow file for this run

name: Build and Release Desktop
on:
workflow_dispatch:
jobs:
build:
name: Build and Release (Windows .exe)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.19.0'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4
- name: Get pnpm store directory
id: pnpm_store
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm_store.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Tauri CLI globally
run: pnpm add -g @tauri-apps/cli@^2
- name: Determine app version (from Tauri)
id: app_version
shell: bash
run: |
VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('apps/desktop/src-tauri/tauri.conf.json','utf8')).version)")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Detected version: $VERSION"
- name: Build and release with Tauri
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: apps/desktop
tauriScript: tauri
args: --bundles nsis
tagName: v${{ steps.app_version.outputs.version }}
releaseName: MiniFy v${{ steps.app_version.outputs.version }}
releaseBody: Automated release for MiniFy v${{ steps.app_version.outputs.version }}
releaseDraft: false
prerelease: false