diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index a4baa34..396c0c3 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -91,7 +91,13 @@ jobs: - name: Patch tauri.conf.json for CI run: | - sed -i '' 's/"beforeBuildCommand": "pnpm build"/"beforeBuildCommand": ""/' src-tauri/tauri.conf.json + python3 -c " + import json, pathlib + p = pathlib.Path('src-tauri/tauri.conf.json') + c = json.loads(p.read_text()) + c.setdefault('build', {})['beforeBuildCommand'] = '' + p.write_text(json.dumps(c, indent=2)) + " - name: Build Tauri app (aarch64) run: | diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 04bf758..e77247d 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -88,7 +88,13 @@ jobs: - name: Patch tauri.conf.json for CI shell: bash run: | - sed -i 's/"beforeBuildCommand": "pnpm build"/"beforeBuildCommand": ""/' src-tauri/tauri.conf.json + python3 -c " + import json, pathlib + p = pathlib.Path('src-tauri/tauri.conf.json') + c = json.loads(p.read_text()) + c.setdefault('build', {})['beforeBuildCommand'] = '' + p.write_text(json.dumps(c, indent=2)) + " - name: Delete existing draft release shell: bash