From 5dcffb53f0f6bd7c0e3f9b1efb43d3866d7ec712 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Thu, 5 Feb 2026 15:39:13 +0700 Subject: [PATCH] Update files --- .github/workflows/desktop-release.yml | 123 ++++++++++++++++++++++++++ README.md | 13 +++ package-lock.json | 8 +- package.json | 2 +- packages/desktop/package-lock.json | 4 +- packages/desktop/package.json | 2 +- packages/website/package.json | 2 +- packages/website/src/routeTree.gen.ts | 21 +++++ 8 files changed, 166 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/desktop-release.yml diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml new file mode 100644 index 000000000..c8d20a688 --- /dev/null +++ b/.github/workflows/desktop-release.yml @@ -0,0 +1,123 @@ +name: Desktop Release + +on: + push: + tags: + - 'v*' + - 'desktop-v*' + workflow_dispatch: + inputs: + tag: + description: 'Existing tag to build (e.g. v0.1.0)' + required: true + type: string + +concurrency: + group: desktop-release-${{ github.ref }} + cancel-in-progress: false + +jobs: + publish-tauri: + permissions: + contents: write + strategy: + fail-fast: false + matrix: + include: + - platform: macos-latest # for Arm based macs (M1 and above). + args: '--target aarch64-apple-darwin' + - platform: macos-latest # for Intel based macs. + args: '--target x86_64-apple-darwin' + - platform: ubuntu-22.04 + args: '' + - platform: windows-latest + args: '' + + runs-on: ${{ matrix.platform }} + env: + RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }} + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + registry-url: 'https://npm.pkg.github.com' + scope: '@boudra' + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + + - name: Install system dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-22.04' + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + + - name: Install JS dependencies + run: npm install --workspace=@getpaseo/app --workspace=@getpaseo/desktop --include-workspace-root + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build web app for Tauri + run: npm run build:web --workspace=@getpaseo/app + + - name: Set desktop version from tag + shell: bash + run: | + node <<'NODE' + const fs = require('node:fs'); + const path = require('node:path'); + + const rawTag = process.env.RELEASE_TAG; + if (!rawTag) throw new Error('RELEASE_TAG env var is missing'); + + const version = rawTag.replace(/^desktop-/, '').replace(/^v/, ''); + console.log(`Using desktop version ${version} from tag ${rawTag}`); + + const tauriConfPath = path.join('packages', 'desktop', 'src-tauri', 'tauri.conf.json'); + const tauriConfText = fs.readFileSync(tauriConfPath, 'utf8'); + const tauriRe = /(\"version\"\\s*:\\s*\")([^\"]+)(\")/; + if (!tauriRe.test(tauriConfText)) { + throw new Error(`Failed to find version field in ${tauriConfPath}`); + } + fs.writeFileSync(tauriConfPath, tauriConfText.replace(tauriRe, `$1${version}$3`)); + + const cargoTomlPath = path.join('packages', 'desktop', 'src-tauri', 'Cargo.toml'); + const cargoLines = fs.readFileSync(cargoTomlPath, 'utf8').split(/\\r?\\n/); + let inPackage = false; + let updated = false; + const nextLines = cargoLines.map((line) => { + if (/^\\[package\\]\\s*$/.test(line)) inPackage = true; + else if (inPackage && /^\\[/.test(line)) inPackage = false; + + if (inPackage && /^version\\s*=\\s*\".*\"\\s*$/.test(line)) { + updated = true; + return `version = \"${version}\"`; + } + return line; + }); + if (!updated) throw new Error(`Failed to update Cargo package version in ${cargoTomlPath}`); + fs.writeFileSync(cargoTomlPath, `${nextLines.join('\\n')}\\n`); + NODE + + - name: Build and publish Tauri release + uses: tauri-apps/tauri-action@v0.6.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + projectPath: packages/desktop + tagName: ${{ env.RELEASE_TAG }} + releaseName: Paseo Desktop ${{ env.RELEASE_TAG }} + releaseBody: See the assets to download and install this version. + releaseDraft: false + prerelease: false + args: ${{ matrix.args }} diff --git a/README.md b/README.md index c18d7a86e..9773b5b2d 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,19 @@ Then open the app and connect to your daemon. See [paseo.sh/docs](https://paseo.sh/docs) for full documentation. +## Desktop releases + +Desktop app binaries are built and attached to a GitHub Release when you push a version tag (for example `v0.1.0` or `desktop-v0.1.0`). + +```bash +git tag v0.1.0 +git push origin v0.1.0 +``` + +If you prefer, `npm version` can be used to create and push a version tag. + +This triggers the `Desktop Release` workflow (`.github/workflows/desktop-release.yml`). + ## License MIT diff --git a/package-lock.json b/package-lock.json index 24c723da9..bedc32ec7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "paseo", - "version": "1.0.0", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "paseo", - "version": "1.0.0", + "version": "0.1.0", "hasInstallScript": true, "license": "MIT", "workspaces": [ @@ -19998,7 +19998,7 @@ }, "packages/desktop": { "name": "@getpaseo/desktop", - "version": "1.0.0", + "version": "0.1.0", "devDependencies": { "@tauri-apps/cli": "^2.9.6" } @@ -20373,7 +20373,7 @@ }, "packages/website": { "name": "@getpaseo/website", - "version": "1.0.0", + "version": "0.1.0", "dependencies": { "@cloudflare/vite-plugin": "^1.20.3", "@cloudflare/workers-types": "^4.20260114.0", diff --git a/package.json b/package.json index f7bbfb924..fec4f6454 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "paseo", - "version": "1.0.0", + "version": "0.1.0", "private": true, "workspaces": [ "packages/server", diff --git a/packages/desktop/package-lock.json b/packages/desktop/package-lock.json index cbab34ec4..417fdb24e 100644 --- a/packages/desktop/package-lock.json +++ b/packages/desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "desktop", - "version": "1.0.0", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "desktop", - "version": "1.0.0", + "version": "0.1.0", "license": "ISC", "devDependencies": { "@tauri-apps/cli": "^2.9.6" diff --git a/packages/desktop/package.json b/packages/desktop/package.json index fb70c4151..32e2434b3 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@getpaseo/desktop", - "version": "1.0.0", + "version": "0.1.0", "private": true, "description": "Paseo desktop app (Tauri wrapper)", "scripts": { diff --git a/packages/website/package.json b/packages/website/package.json index 374a7bf6d..5b310d55f 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "@getpaseo/website", - "version": "1.0.0", + "version": "0.1.0", "private": true, "type": "module", "scripts": { diff --git a/packages/website/src/routeTree.gen.ts b/packages/website/src/routeTree.gen.ts index 91e83a05f..6c8178098 100644 --- a/packages/website/src/routeTree.gen.ts +++ b/packages/website/src/routeTree.gen.ts @@ -12,6 +12,7 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as DocsRouteImport } from './routes/docs' import { Route as IndexRouteImport } from './routes/index' import { Route as DocsIndexRouteImport } from './routes/docs/index' +import { Route as DocsWorktreesRouteImport } from './routes/docs/worktrees' import { Route as DocsSecurityRouteImport } from './routes/docs/security' import { Route as DocsConfigurationRouteImport } from './routes/docs/configuration' import { Route as DocsCliRouteImport } from './routes/docs/cli' @@ -32,6 +33,11 @@ const DocsIndexRoute = DocsIndexRouteImport.update({ path: '/', getParentRoute: () => DocsRoute, } as any) +const DocsWorktreesRoute = DocsWorktreesRouteImport.update({ + id: '/worktrees', + path: '/worktrees', + getParentRoute: () => DocsRoute, +} as any) const DocsSecurityRoute = DocsSecurityRouteImport.update({ id: '/security', path: '/security', @@ -60,6 +66,7 @@ export interface FileRoutesByFullPath { '/docs/cli': typeof DocsCliRoute '/docs/configuration': typeof DocsConfigurationRoute '/docs/security': typeof DocsSecurityRoute + '/docs/worktrees': typeof DocsWorktreesRoute '/docs/': typeof DocsIndexRoute } export interface FileRoutesByTo { @@ -68,6 +75,7 @@ export interface FileRoutesByTo { '/docs/cli': typeof DocsCliRoute '/docs/configuration': typeof DocsConfigurationRoute '/docs/security': typeof DocsSecurityRoute + '/docs/worktrees': typeof DocsWorktreesRoute '/docs': typeof DocsIndexRoute } export interface FileRoutesById { @@ -78,6 +86,7 @@ export interface FileRoutesById { '/docs/cli': typeof DocsCliRoute '/docs/configuration': typeof DocsConfigurationRoute '/docs/security': typeof DocsSecurityRoute + '/docs/worktrees': typeof DocsWorktreesRoute '/docs/': typeof DocsIndexRoute } export interface FileRouteTypes { @@ -89,6 +98,7 @@ export interface FileRouteTypes { | '/docs/cli' | '/docs/configuration' | '/docs/security' + | '/docs/worktrees' | '/docs/' fileRoutesByTo: FileRoutesByTo to: @@ -97,6 +107,7 @@ export interface FileRouteTypes { | '/docs/cli' | '/docs/configuration' | '/docs/security' + | '/docs/worktrees' | '/docs' id: | '__root__' @@ -106,6 +117,7 @@ export interface FileRouteTypes { | '/docs/cli' | '/docs/configuration' | '/docs/security' + | '/docs/worktrees' | '/docs/' fileRoutesById: FileRoutesById } @@ -137,6 +149,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DocsIndexRouteImport parentRoute: typeof DocsRoute } + '/docs/worktrees': { + id: '/docs/worktrees' + path: '/worktrees' + fullPath: '/docs/worktrees' + preLoaderRoute: typeof DocsWorktreesRouteImport + parentRoute: typeof DocsRoute + } '/docs/security': { id: '/docs/security' path: '/security' @@ -173,6 +192,7 @@ interface DocsRouteChildren { DocsCliRoute: typeof DocsCliRoute DocsConfigurationRoute: typeof DocsConfigurationRoute DocsSecurityRoute: typeof DocsSecurityRoute + DocsWorktreesRoute: typeof DocsWorktreesRoute DocsIndexRoute: typeof DocsIndexRoute } @@ -181,6 +201,7 @@ const DocsRouteChildren: DocsRouteChildren = { DocsCliRoute: DocsCliRoute, DocsConfigurationRoute: DocsConfigurationRoute, DocsSecurityRoute: DocsSecurityRoute, + DocsWorktreesRoute: DocsWorktreesRoute, DocsIndexRoute: DocsIndexRoute, }