From eeea8f3bbfd8542a931a358d99aaf243ea9ab35b Mon Sep 17 00:00:00 2001 From: Mohmn Date: Wed, 18 Oct 2023 00:42:08 +0530 Subject: [PATCH] feat: add updater functionlaity --- .github/workflows/create-bundle.yml | 13 +++++++------ src-tauri/tauri.conf.json | 8 ++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create-bundle.yml b/.github/workflows/create-bundle.yml index 130b5c0..03d7ffe 100644 --- a/.github/workflows/create-bundle.yml +++ b/.github/workflows/create-bundle.yml @@ -45,13 +45,14 @@ jobs: run: npm install # Change this to npm, yarn or pnpm. - name: Build the app - uses: tauri-apps/tauri-action@v0 - + uses: tauri-apps/tauri-action@dev env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} with: - tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags. - releaseName: 'App Name v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version. - releaseBody: 'See the assets to download and install this version.' - releaseDraft: true + tagName: __VERSION__v + releaseName: 'smearshot v__VERSION__' + releaseBody: 'See the assets to download this version and install.' + releaseDraft: false prerelease: false diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 2eab1a2..e94a55e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -69,6 +69,14 @@ "systemTray": { "iconPath": "icons/icon.png", "iconAsTemplate": true + }, + "updater": { + "active": true, + "endpoints": [ + "https://github.com/Mohmn/smearshot/releases/latest/download/latest.json" + ], + "dialog": true, + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQ4MzlFQjJBNTc2RkVFRDMKUldUVDdtOVhLdXM1MlBPMVFNL0RHNURoZTMrOGxRa2RiVEU5MlV5Yk1oRlI4MXpxRlQ4aXBDOTcK" } } }