Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/scripts/add-signing-public-key.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* @brief Part of the automatic updates pipeline. This will read the environment variable
* `TAURI_SIGNING_PUBLIC_KEY` and attach it to the `tauri.conf.json` file.
*
* @see https://v2.tauri.app/plugin/updater/
*
* @note This script is intended to be run in a GitHub Actions workflow, and not locally. It
* will overwrite the `tauri.conf.json` file. This change is not meant to be committed.
*/

import * as fs from "fs";

/**
* @brief We use the environment variable `TAURI_SIGNING_PUBLIC_KEY`
*/
const PUBLIC_KEY = process.env.TAURI_SIGNING_PUBLIC_KEY;

/**
* @brief Path to the Tauri configuration file.
*/
const TAURI_CONFIG_PATH = "torii-desktop/tauri.conf.json";

/**
* @brief Appends the information as specified by the Tauri Updater plugin to the Tauri
* configuration file.
*
* @see
*/
function appendUpdaterConfig() {
const tauriConfig = JSON.parse(fs.readFileSync(TAURI_CONFIG_PATH, "utf-8"));
tauriConfig.bundle.createUpdaterArtifacts = true;
tauriConfig.plugins.updater.pubkey = PUBLIC_KEY;
fs.writeFileSync(TAURI_CONFIG_PATH, JSON.stringify(tauriConfig, null, 4));

console.log('Public Key: ', PUBLIC_KEY);
}

// Run the change updater configuration.
appendUpdaterConfig();
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
publish-tauri:
permissions:
contents: write
environment: Publish Environment
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -78,9 +79,16 @@ jobs:
if: matrix.platform == 'windows-latest'
run: npm run fix-windows-version

- name: Inject signing public key into config
run: npm run add-signing-public-key
env:
TAURI_SIGNING_PUBLIC_KEY: ${{ vars.TAURI_SIGNING_PUBLIC_KEY }}

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
# TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
tagName: app-v${{ steps.get-version.outputs.version }}
releaseName: 'App v${{ steps.get-version.outputs.version }}'
Expand Down
141 changes: 141 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ The first stage of the project is to create a simple file browser like applicati

Due to my Bachelors' thesis I took a 3 week break from Torii here and `dev9` should be a small update to bring back the pace.

- [x] Add updater artifacts (build signatures) to CI/CD.
- [x] Add a button which checks if an update is available. (Not Tested!)

### `v0.0.0-dev10`

- [ ] Edit Mode: WYSIWYG if provided, allows to edit article, drag and drop
Expand Down
26 changes: 24 additions & 2 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"devDependencies": {
"@tauri-apps/cli": "^2.11.1",
"@types/node": "^25.9.3",
"@types/node": "^25.9.5",
"@vitejs/plugin-vue": "^6.0.7",
"tsx": "^4.22.4",
"vite": "^8.0.16",
Expand All @@ -18,6 +18,7 @@
"lint": "npm run lint --workspace=torii-client",
"tauri": "tauri",
"fix-windows-version": "tsx .github/scripts/fix-windows-versioning.ts",
"add-signing-public-key": "tsx .github/scripts/add-signing-public-key.ts ",
"version": "tsx .github/scripts/print-tauri-version.ts",
"docs": "npm run docs --workspace=torii-client"
}
Expand Down
2 changes: 2 additions & 0 deletions torii-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"@tauri-apps/api": "^2.11.0",
"@tauri-apps/plugin-dialog": "^2.7.1",
"@tauri-apps/plugin-opener": "^2.5.4",
"@tauri-apps/plugin-process": "^2.3.1",
"@tauri-apps/plugin-store": "^2.4.3",
"@tauri-apps/plugin-updater": "^2.10.1",
"@tiptap/extension-list": "^3.27.1",
"@tiptap/markdown": "^3.27.1",
"@tiptap/pm": "^3.27.1",
Expand Down
Loading
Loading