ci: enable updater only when tag
parent
c4242e9f66
commit
e1737f7c30
|
|
@ -62,6 +62,10 @@ jobs:
|
|||
with:
|
||||
projectPath: ./gui
|
||||
|
||||
- name: Prepare to release the app
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/gui-v') }}
|
||||
run: deno run -A ./gui/scripts/enable-updater.ts
|
||||
|
||||
- name: Release the app
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/gui-v') }}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
import * as path from "https://deno.land/std@0.178.0/path/mod.ts";
|
||||
|
||||
if (import.meta.main) {
|
||||
const __dirname = path.dirname(path.fromFileUrl(import.meta.url));
|
||||
const tauriConf = path.join(__dirname, '../src-tauri/tauri.conf.json');
|
||||
const tauriConfContent = await Deno.readTextFile(tauriConf);
|
||||
const tauriConfJson = JSON.parse(tauriConfContent);
|
||||
tauriConfJson.tauri.updater.active = true;
|
||||
await Deno.writeTextFile(tauriConf, JSON.stringify(tauriConfJson, null, 2));
|
||||
}
|
||||
|
|
@ -72,8 +72,9 @@
|
|||
"csp": null
|
||||
},
|
||||
"updater": {
|
||||
"active": true,
|
||||
"active": false,
|
||||
"endpoints": [
|
||||
"https://s3si-update.imspace.cn/v1/{{target}}/{{arch}}/{{current_version}}",
|
||||
"https://gist.githubusercontent.com/spacemeowx2/a67078487d3450b75927953f6edc14e2/raw/update-request.json"
|
||||
],
|
||||
"dialog": true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue