From 61dcbbc7157e3ee45aa0f4ce472ab0792f96de0c Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Sat, 29 Nov 2025 16:23:36 +0400 Subject: [PATCH] build: don't fail if dist is already created --- .github/workflows/release.yml | 13 +++++++++++++ .github/workflows/rolling-release.yml | 13 +++++++++++++ src-tauri/tauri.conf.json | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03c1469..fb60be8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -180,12 +180,25 @@ jobs: - name: Build frontend run: pnpm build + - name: Verify frontend dist exists + shell: bash + run: | + if [ ! -d "dist" ]; then + echo "Error: dist directory not found after build" + ls -la + exit 1 + fi + echo "Frontend dist directory verified at $(pwd)/dist" + echo "Checking from src-tauri perspective:" + ls -la src-tauri/../dist || echo "Warning: dist not accessible from src-tauri" + - name: Build Tauri app uses: tauri-apps/tauri-action@19b93bb55601e3e373a93cfb6eb4242e45f5af20 #v0.6.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REF_NAME: ${{ github.ref_name }} with: + projectPath: ./src-tauri tagName: ${{ github.ref_name }} releaseName: "Donut Browser ${{ github.ref_name }}" releaseBody: "See the assets to download this version and install." diff --git a/.github/workflows/rolling-release.yml b/.github/workflows/rolling-release.yml index 11364f9..0eb6533 100644 --- a/.github/workflows/rolling-release.yml +++ b/.github/workflows/rolling-release.yml @@ -179,6 +179,18 @@ jobs: - name: Build frontend run: pnpm build + - name: Verify frontend dist exists + shell: bash + run: | + if [ ! -d "dist" ]; then + echo "Error: dist directory not found after build" + ls -la + exit 1 + fi + echo "Frontend dist directory verified at $(pwd)/dist" + echo "Checking from src-tauri perspective:" + ls -la src-tauri/../dist || echo "Warning: dist not accessible from src-tauri" + - name: Generate nightly timestamp id: timestamp shell: bash @@ -196,6 +208,7 @@ jobs: GITHUB_REF_NAME: "nightly-${{ steps.timestamp.outputs.timestamp }}" GITHUB_SHA: ${{ github.sha }} with: + projectPath: ./src-tauri tagName: "nightly-${{ steps.timestamp.outputs.timestamp }}" releaseName: "Donut Browser Nightly (Build ${{ steps.timestamp.outputs.timestamp }})" releaseBody: "⚠️ **Nightly Release** - This is an automatically generated pre-release build from the latest main branch. Use with caution.\n\nCommit: ${{ github.sha }}\nBuild: ${{ steps.timestamp.outputs.timestamp }}" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index b6a5484..c93e88e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -6,7 +6,7 @@ "build": { "beforeDevCommand": "pnpm copy-proxy-binary && pnpm dev", "devUrl": "http://localhost:3000", - "beforeBuildCommand": "pnpm copy-proxy-binary && pnpm build", + "beforeBuildCommand": "pnpm copy-proxy-binary && (test -d ../dist || pnpm build)", "frontendDist": "../dist" }, "app": {