Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

chore: auto-sync version from git tag to tauri.conf.json in CI

esengine22587f937985
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index ad4a766af..ae0f549fa 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -25,6 +25,18 @@ jobs:
with:
submodules: recursive
+ - name: Sync version from tag to tauri.conf.json
+ shell: bash
+ run: |
+ VERSION="${GITHUB_REF_NAME#v}"
+ node -e "
+ const fs = require('fs');
+ const p = 'desktop/src-tauri/tauri.conf.json';
+ const c = JSON.parse(fs.readFileSync(p, 'utf8'));
+ c.version = '${VERSION}';
+ fs.writeFileSync(p, JSON.stringify(c, null, 2) + '\n');
+ "
+
- uses: actions/setup-node@v4
with:
node-version: 22