Skip to content

Commit 20651b1

Browse files
authored
Merge pull request #27 from ZeroKnowledgeNetwork/feat/updater-init
feat: init updater
2 parents a6fbea8 + 477f7e5 commit 20651b1

File tree

9 files changed

+164
-0
lines changed

9 files changed

+164
-0
lines changed

.github/workflows/publish-to-auto-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
- uses: tauri-apps/tauri-action@v0
7878
env:
7979
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
81+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
8082
with:
8183
tagName: v${{ env.VERSION }}
8284
releaseName: v${{ env.VERSION }}

.github/workflows/test-build-only.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,7 @@ jobs:
5050
- uses: tauri-apps/tauri-action@v0
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
54+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
5355
with:
5456
args: ${{ matrix.args }}

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@tauri-apps/plugin-os": "^2.2.1",
1919
"@tauri-apps/plugin-shell": "^2.2.1",
2020
"@tauri-apps/plugin-store": "^2.2.0",
21+
"@tauri-apps/plugin-updater": "^2.7.0",
2122
"@tauri-apps/plugin-upload": "^2.2.1",
2223
"react": "^18.3.1",
2324
"react-dom": "^18.3.1",

src-tauri/Cargo.lock

Lines changed: 132 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ tauri-plugin-store = "2"
3333

3434
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
3535
tauri-plugin-single-instance = "2"
36+
tauri-plugin-updater = "2"
3637

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"identifier": "desktop-capability",
3+
"platforms": ["macOS", "windows", "linux"],
4+
"windows": ["main"],
5+
"permissions": ["updater:default"]
6+
}

src-tauri/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub fn run() {
2626
}
2727
}
2828
}))
29+
.plugin(tauri_plugin_updater::Builder::new().build())
2930
.plugin(tauri_plugin_store::Builder::new().build())
3031
.plugin(
3132
tauri_plugin_log::Builder::new()

src-tauri/tauri.conf.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
},
2323
"bundle": {
2424
"active": true,
25+
"createUpdaterArtifacts": true,
2526
"targets": ["deb", "rpm", "appimage", "nsis", "app", "dmg"],
2627
"icon": [
2728
"icons/32x32.png",
@@ -30,5 +31,13 @@
3031
"icons/icon.icns",
3132
"icons/icon.ico"
3233
]
34+
},
35+
"plugins": {
36+
"updater": {
37+
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDNGMjNBNTM3MjA2QzY1QjMKUldTelpXd2dONlVqUDc4TW4xK3owUkJJOXdleW1lNkR2MVlRcExtL1lpcjVhVW5HS3Rmb0hOM3gK",
38+
"endpoints": [
39+
"https://github.com/ZeroKnowledgeNetwork/client/releases/latest/download/latest.json"
40+
]
41+
}
3342
}
3443
}

0 commit comments

Comments
 (0)