Skip to content

Commit ae13e88

Browse files
ci: merge release and desktop workflows into single pipeline
- CLI builds → create release → desktop builds + homebrew update - Desktop builds now find the existing release instead of trying to create one - Fix homebrew script to compute SHA256 from artifacts directly Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3585289 commit ae13e88

3 files changed

Lines changed: 65 additions & 75 deletions

File tree

.github/workflows/release-desktop.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ env:
1313
RUSTC_WRAPPER: ""
1414

1515
jobs:
16-
build:
17-
name: Build (${{ matrix.target }})
16+
build-cli:
17+
name: Build CLI (${{ matrix.target }})
1818
strategy:
1919
fail-fast: false
2020
matrix:
@@ -81,7 +81,7 @@ jobs:
8181

8282
release:
8383
name: Create Release
84-
needs: build
84+
needs: build-cli
8585
runs-on: ubuntu-latest
8686

8787
steps:
@@ -106,6 +106,65 @@ jobs:
106106
artifacts/reasondb-*
107107
artifacts/checksums-sha256.txt
108108
109+
build-desktop:
110+
name: Build Desktop (${{ matrix.platform }})
111+
needs: release
112+
strategy:
113+
fail-fast: false
114+
matrix:
115+
include:
116+
- platform: macos-latest
117+
args: --target universal-apple-darwin
118+
rust-targets: aarch64-apple-darwin,x86_64-apple-darwin
119+
- platform: windows-latest
120+
args: ''
121+
rust-targets: ''
122+
123+
runs-on: ${{ matrix.platform }}
124+
125+
steps:
126+
- uses: actions/checkout@v4
127+
128+
- name: Install Node.js
129+
uses: actions/setup-node@v4
130+
with:
131+
node-version: 20
132+
cache: npm
133+
cache-dependency-path: apps/reasondb-client/package-lock.json
134+
135+
- name: Install Rust stable
136+
uses: dtolnay/rust-toolchain@stable
137+
with:
138+
targets: ${{ matrix.rust-targets }}
139+
140+
- name: Rust cache
141+
uses: swatinem/rust-cache@v2
142+
with:
143+
workspaces: apps/reasondb-client/src-tauri -> target
144+
145+
- name: Install frontend dependencies
146+
working-directory: apps/reasondb-client
147+
run: npm ci
148+
149+
- name: Build and release (Tauri)
150+
uses: tauri-apps/tauri-action@v0
151+
env:
152+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153+
RUSTC_WRAPPER: ''
154+
NODE_OPTIONS: --max-old-space-size=4096
155+
with:
156+
projectPath: apps/reasondb-client
157+
tagName: ${{ github.ref_name }}
158+
releaseName: ReasonDB ${{ github.ref_name }}
159+
releaseBody: |
160+
See the assets below to download and install ReasonDB ${{ github.ref_name }}.
161+
162+
**macOS:** Download the `.dmg` file and drag ReasonDB into your Applications folder.
163+
**Windows:** Download the `.msi` or `.exe` installer and run it.
164+
releaseDraft: false
165+
prerelease: false
166+
args: ${{ matrix.args }}
167+
109168
update-homebrew:
110169
name: Update Homebrew Tap
111170
needs: release

scripts/update-homebrew.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
VERSION="${1:?Usage: update-homebrew.sh <version> <checksums-dir>}"
5-
CHECKSUMS_DIR="${2:?Usage: update-homebrew.sh <version> <checksums-dir>}"
4+
VERSION="${1:?Usage: update-homebrew.sh <version> <artifacts-dir>}"
5+
ARTIFACTS_DIR="${2:?Usage: update-homebrew.sh <version> <artifacts-dir>}"
66

77
sha_for() {
88
local target="$1"
9-
grep "reasondb-${VERSION}-${target}" "${CHECKSUMS_DIR}/checksums-sha256.txt" | awk '{print $1}'
9+
sha256sum "${ARTIFACTS_DIR}/reasondb-${VERSION}-${target}.tar.gz" | awk '{print $1}'
1010
}
1111

1212
SHA_AARCH64_MACOS=$(sha_for "aarch64-apple-darwin")

0 commit comments

Comments
 (0)