From 6dadf766bb05fd291d0d8c16d656fb5f921511ab Mon Sep 17 00:00:00 2001 From: Jeroen Nijhuis Date: Mon, 22 Apr 2024 20:51:33 +0200 Subject: [PATCH] feat: enable auto-updater --- .github/workflows/release.yml | 12 +++++++----- src-tauri/tauri.conf.json | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31db495..1d67a9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 - cache: 'npm' + cache: "npm" - name: Install dependencies run: npm install @@ -66,10 +66,11 @@ jobs: uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} with: tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version - releaseName: 'v__VERSION__' - releaseBody: 'See the assets to download and install this version.' + releaseName: "v__VERSION__" + releaseBody: "See the assets to download and install this version." releaseDraft: true prerelease: false tauriScript: ./node_modules/.bin/tauri @@ -82,10 +83,11 @@ jobs: SSL_CERT_FILE: 'C:\Program Files\OpenSSL\ca\cacert.pem' OPENSSL_NO_VENDOR: 1 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} with: tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version - releaseName: 'v__VERSION__' - releaseBody: 'See the assets to download and install this version.' + releaseName: "v__VERSION__" + releaseBody: "See the assets to download and install this version." releaseDraft: true prerelease: false tauriScript: ./node_modules/.bin/tauri diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 76adb3b..5645bb2 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -10,12 +10,25 @@ "beforeBuildCommand": "npm run vite:build" }, "tauri": { + "updater": { + "active": true, + "endpoints": ["https://www.jet-pilot.app/latest.json"], + "dialog": true, + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDVDNUVCM0NBRDZFNzFFOEIKUldTTEh1Zld5ck5lWEx6MEdwZXp4cHBReDR6dUtac3pNUm9GbUxvcFhKS28wOTJQL1BqNkFiN2EK" + }, "macOSPrivateApi": true, "allowlist": { "all": true, "fs": { - "all": true, - "scope": ["$APPCONFIG/", "$APPCONFIG/*", "$TEMP/", "$TEMP/*", "$TEMP/*/**", "$TEMP/**"] + "all": true, + "scope": [ + "$APPCONFIG/", + "$APPCONFIG/*", + "$TEMP/", + "$TEMP/*", + "$TEMP/*/**", + "$TEMP/**" + ] }, "shell": { "scope": [ @@ -55,4 +68,4 @@ "csp": null } } -} \ No newline at end of file +}