Skip to content

Commit 57a3e67

Browse files
author
b45632
committed
feat: add in-app updates and IDE detection
1 parent 1b40430 commit 57a3e67

24 files changed

Lines changed: 1634 additions & 112 deletions

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ jobs:
4949
node-version: ${{ env.NODE_VERSION }}
5050
package-manager-cache: false
5151

52+
- name: Updater-Signierschlüssel prüfen
53+
shell: bash
54+
env:
55+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
56+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
57+
run: |
58+
if [ -z "$TAURI_SIGNING_PRIVATE_KEY" ]; then
59+
echo "::error::Repository secret TAURI_SIGNING_PRIVATE_KEY fehlt. Siehe docs/updater-setup.md."
60+
exit 1
61+
fi
62+
if [ -z "$TAURI_SIGNING_PRIVATE_KEY_PASSWORD" ]; then
63+
echo "::error::Repository secret TAURI_SIGNING_PRIVATE_KEY_PASSWORD fehlt. Siehe docs/updater-setup.md."
64+
exit 1
65+
fi
66+
5267
- name: Tag und App-Versionen prüfen
5368
shell: bash
5469
run: |
@@ -262,12 +277,17 @@ jobs:
262277
uses: tauri-apps/tauri-action@v1
263278
env:
264279
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
280+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
281+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
265282
with:
266283
releaseId: ${{ needs.prepare-release.outputs.release_id }}
267284
tagName: ${{ env.RELEASE_TAG }}
268285
releaseDraft: true
269286
prerelease: ${{ contains(env.RELEASE_TAG, '-') }}
270287
retryAttempts: 2
288+
uploadUpdaterJson: true
289+
uploadUpdaterSignatures: true
290+
updaterJsonPreferNsis: true
271291
releaseAssetNamePattern: "Code-Deck_[version]_[platform]_[arch][setup][ext]"
272292
uploadWorkflowArtifacts: true
273293
workflowArtifactNamePattern: "Code-Deck_[version]_[platform]_[arch]_[bundle]"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ Thumbs.db
2727
*.njsproj
2828
*.sln
2929
*.sw?
30+
*.key
31+
*.key.pem
32+
updater-private*

CHANGELOG.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@ The project follows [Semantic Versioning](https://semver.org/).
2323

2424
### Security
2525

26+
## [0.2.2]
27+
28+
### Added
29+
30+
- Secure in-app updates from signed GitHub Release artifacts.
31+
- Automatic update checks on application startup.
32+
- Manual update checks and an update preference in Settings.
33+
- Download and installation progress inside the update dialog.
34+
- Automatic IDE detection on the first application launch.
35+
- Broader IDE detection for common Windows, macOS and Linux installations.
36+
- A test action for every saved IDE that opens the Desktop folder.
37+
38+
### Changed
39+
40+
- Fresh installations no longer assume that VS Code or Cursor is installed.
41+
- Release builds now create signed updater artifacts and `latest.json`.
42+
2643
## [0.2.1]
2744

2845
### Added
@@ -83,8 +100,8 @@ The project follows [Semantic Versioning](https://semver.org/).
83100
- Imported commands are never started automatically.
84101
- Project inspection does not modify project source files.
85102

86-
[Unreleased]: https://github.com/JadnK/CodeDeck/compare/v0.2.1...HEAD
103+
[Unreleased]: https://github.com/JadnK/CodeDeck/compare/v0.2.2...HEAD
104+
[0.2.2]: https://github.com/JadnK/CodeDeck/compare/v0.2.1...v0.2.2
105+
[0.2.1]: https://github.com/JadnK/CodeDeck/compare/v0.2.0...v0.2.1
87106
[0.2.0]: https://github.com/JadnK/CodeDeck/compare/v0.1.0...v0.2.0
88107
[0.1.0]: https://github.com/JadnK/CodeDeck/releases/tag/v0.1.0
89-
90-
[0.2.1]: https://github.com/JadnK/CodeDeck/compare/v0.2.0...v0.2.1

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ This guide explains the app page by page. The names in bold match the current Ge
2424
- A **template** is a folder used as the starting point for a new project.
2525

2626
Code Deck keeps its own configuration locally. Adding a project does not move the project folder, and opening a project does not change its source files.
27+
28+
## Maintainer setup
29+
30+
- [Signed in-app updater](updater-setup.md)

docs/updater-setup.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# In-app updater setup
2+
3+
CodeDeck uses Tauri's signed updater and GitHub Releases. The public verification key is committed in `src-tauri/tauri.conf.json`. The private signing key must never be committed.
4+
5+
## One-time GitHub setup
6+
7+
Open the repository and go to:
8+
9+
```text
10+
Settings → Secrets and variables → Actions → New repository secret
11+
```
12+
13+
Create these secrets:
14+
15+
| Secret | Value |
16+
|---|---|
17+
| `TAURI_SIGNING_PRIVATE_KEY` | Complete contents of the generated private key file |
18+
| `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` | Password belonging to that private key |
19+
20+
Keep an offline backup of both values. Losing the key or password prevents future releases from updating existing installations.
21+
22+
## Publishing an update
23+
24+
1. Increase the same version in `package.json`, `src-tauri/Cargo.toml` and `src-tauri/tauri.conf.json`.
25+
2. Update `CHANGELOG.md`.
26+
3. Commit and push the changes.
27+
4. Create and push a matching tag, for example `v0.2.3`.
28+
5. Let the Release workflow finish.
29+
6. Publish the generated draft release.
30+
31+
The workflow uploads normal installers, signed updater bundles, signature files and `latest.json`. The app only sees a new update after the GitHub Release has been published.
32+
33+
## Testing
34+
35+
Version `0.2.2` is the first CodeDeck build containing the updater. Install it manually once. To test the update flow, publish a higher version such as `0.2.3`, then start `0.2.2` again.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-deck",
33
"private": true,
4-
"version": "0.2.1",
4+
"version": "0.2.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -14,6 +14,8 @@
1414
"dependencies": {
1515
"@tauri-apps/api": "^2.8.0",
1616
"@tauri-apps/plugin-dialog": "^2.4.0",
17+
"@tauri-apps/plugin-process": "^2.3.1",
18+
"@tauri-apps/plugin-updater": "^2.10.1",
1719
"react": "^19.1.0",
1820
"react-dom": "^19.1.0"
1921
},

pnpm-lock.yaml

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)