Skip to content

Commit

Permalink
feat: add auto updater (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
orangelckc committed Mar 26, 2023
1 parent 77a261b commit 58ca3df
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 16 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
on:
push:
tags:
- 'v*'
- "v*"
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -59,13 +59,13 @@ jobs:
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
workspaces: "./src-tauri -> target"

- name: Sync node version and setup cache
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'pnpm'
node-version: "16"
cache: "pnpm"

- name: Install app dependencies and build web
run: pnpm install --frozen-lockfile
Expand All @@ -74,9 +74,11 @@ jobs:
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ""
with:
tagName: ${{ github.ref_name }}
releaseName: ChatGPT-Desktop ${{ needs.create-release.outputs.APP_VERSION }}
releaseBody: ''
releaseBody: ""
releaseDraft: true
prerelease: false
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ChatGPT-Desktop",
"name": "chatgpt-desktop",
"private": true,
"version": "0.0.7",
"type": "module",
Expand Down Expand Up @@ -70,4 +70,4 @@
"vite": "^4.0.0",
"vue-tsc": "^1.0.11"
}
}
}
23 changes: 22 additions & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chat_gpt"
version = "1.0.0"
version = "0.0.8"
description = "ChatGPT-Desktop"
authors = ["orangelckc", "bilibili-ayang"]
license = "MIT"
Expand All @@ -13,7 +13,7 @@ edition = "2021"
tauri-build = { version = "1.2", features = [] }

[dependencies]
tauri = { version = "1.2", features = ["api-all", "macos-private-api", "system-tray"] }
tauri = { version = "1.2", features = ["api-all", "macos-private-api", "system-tray", "updater"] }
tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
13 changes: 7 additions & 6 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@
"icons/icon.icns",
"icons/icon.ico"
],
"targets": [
"deb",
"msi",
"dmg"
],
"targets": "all",
"identifier": "com.ChatGPT-Desktop",
"macOS": {
"entitlements": null,
Expand All @@ -71,7 +67,12 @@
"csp": null
},
"updater": {
"active": false
"active": true,
"dialog": true,
"endpoints": [
"https://updater-two.vercel.app/update/{{target}}/{{current_version}}"
],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDhDRkYzMDc2NTFGRTQ5MTIKUldRU1NmNVJkakQvaklIVnpidTB5TVBwUXlFOTI1WkJwS0h4YTJScEdxQ0lzRkFnQUhDQ3pnM28K"
},
"windows": [
{
Expand Down

0 comments on commit 58ca3df

Please sign in to comment.