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
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,25 @@ on:
branches:
- main
workflow_dispatch:
workflow_call:

permissions:
contents: read

jobs:
release-tools:
name: Product version and release tools
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22.22.2"
- name: Verify product version
run: node scripts/product-version.mjs --check
- name: Test version synchronization and release aggregation
run: node --test scripts/product-version.test.mjs scripts/prepare-release.test.mjs

rust:
name: Rust
runs-on: ubuntu-latest
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Desktop Packages
on:
push:
branches: [main]
tags: ['v*']
workflow_dispatch:

permissions:
Expand All @@ -13,8 +14,34 @@ concurrency:
cancel-in-progress: false

jobs:
version:
name: Validate product version and release tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22.22.2"
- name: Verify synchronized product version
run: node scripts/product-version.mjs --check
- name: Require an annotated release tag on main
if: github.ref_type == 'tag'
run: |
test "$(git cat-file -t "$GITHUB_REF")" = tag
git merge-base --is-ancestor "$GITHUB_SHA" origin/main

ci:
name: Release CI
needs: version
if: github.ref_type == 'tag'
uses: ./.github/workflows/ci.yml

macos:
name: macOS ${{ matrix.arch }}
needs: [version, ci]
if: ${{ !cancelled() && needs.version.result == 'success' && (needs.ci.result == 'success' || needs.ci.result == 'skipped') }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -92,6 +119,8 @@ jobs:

windows:
name: Windows x86_64
needs: [version, ci]
if: ${{ !cancelled() && needs.version.result == 'success' && (needs.ci.result == 'success' || needs.ci.result == 'skipped') }}
runs-on: windows-latest
timeout-minutes: 150
steps:
Expand Down Expand Up @@ -174,6 +203,8 @@ jobs:

linux:
name: Linux ${{ matrix.arch }}
needs: [version, ci]
if: ${{ !cancelled() && needs.version.result == 'success' && (needs.ci.result == 'success' || needs.ci.result == 'skipped') }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -257,6 +288,41 @@ jobs:
compression-level: 0
retention-days: 7

release:
name: Create draft GitHub Release
needs: [version, ci, macos, windows, linux]
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22.22.2"
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: Chat2DB-Rust-Desktop-*-${{ github.sha }}
path: target/release-artifacts
- name: Verify and collect all platform packages
run: node scripts/prepare-release.mjs target/release-artifacts target/release
- name: Create or update draft release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ github.ref_name }}
run: |
if gh release view "$RELEASE_TAG" --json isDraft --jq '.isDraft' > "$RUNNER_TEMP/chat2db-release-is-draft"; then
if [[ "$(cat "$RUNNER_TEMP/chat2db-release-is-draft")" != true ]]; then
echo "Refusing to replace assets on an already published release" >&2
exit 1
fi
else
gh release create "$RELEASE_TAG" --verify-tag --draft \
--title "Chat2DB Rust $(node scripts/product-version.mjs)" --generate-notes
fi
gh release upload "$RELEASE_TAG" target/release/* --clobber

notify-feishu:
name: Feishu notification
if: ${{ always() }}
Expand Down
26 changes: 13 additions & 13 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ members = [
]

[workspace.package]
version = "0.1.0"
version = "0.0.1"
edition = "2024"
rust-version = "1.88"
authors = ["OtterMind"]
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: verify rust rust-process-tests java ipc-integration jdbc-h2-integration \
.PHONY: verify release-tools rust rust-process-tests java ipc-integration jdbc-h2-integration \
community-h2-classpath community-h2-reproducibility community-java-h2-integration \
community-h2-integration \
community-product-h2-integration product-h2-integration mysql-driver-pack h2-driver-pack dm-driver-pack \
Expand All @@ -17,11 +17,15 @@ MYSQL_TEST_HOST ?= 127.0.0.1
MYSQL_TEST_PORT ?= 3306
MYSQL_TEST_JDBC_PARAMETERS ?= sslMode=DISABLED&allowPublicKeyRetrieval=true&serverTimezone=UTC&zeroDateTimeBehavior=CONVERT_TO_NULL&tinyInt1isBit=false

verify: rust rust-process-tests java ipc-integration jdbc-h2-integration \
verify: release-tools rust rust-process-tests java ipc-integration jdbc-h2-integration \
community-java-h2-integration community-h2-integration \
community-product-h2-integration product-h2-integration \
dm-driver-pack-integration dm-product-integration frontend desktop

release-tools:
node scripts/product-version.mjs --check
node --test scripts/product-version.test.mjs scripts/prepare-release.test.mjs

rust:
cargo fmt --all --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ for every platform supported by Chat2DB Community:
Every desktop package embeds the matching `chat2db` headless CLI beside the
shared Java, Community-classpath, and driver-pack resources.

Product versions and tagged Draft Releases follow [the release guide](docs/releases.md).

macOS packages are always signed with the configured Developer ID Application
identity and notarized by Apple before upload. Packaging fails closed when the
signing or notarization configuration is unavailable.
Expand Down
8 changes: 6 additions & 2 deletions apps/chat2db-desktop/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Chat2DB Rust",
"version": "0.1.0",
"version": "0.0.1",
"identifier": "ai.chat2db.desktop",
"build": {
"beforeDevCommand": "npm --prefix ../frontend run dev",
Expand Down Expand Up @@ -29,6 +29,10 @@
},
"bundle": {
"active": false,
"icon": ["icons/icon.png", "icons/icon.icns", "icons/icon.ico"]
"icon": [
"icons/icon.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}
4 changes: 2 additions & 2 deletions apps/frontend/package-lock.json

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

2 changes: 1 addition & 1 deletion apps/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chat2db/frontend",
"version": "0.1.0",
"version": "0.0.1",
"private": true,
"type": "module",
"packageManager": "npm@10.9.7",
Expand Down
2 changes: 1 addition & 1 deletion contracts/openapi/chat2db-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "Apache-2.0",
"identifier": "Apache-2.0"
},
"version": "0.1.0"
"version": "0.0.1"
},
"paths": {
"/api/v1/agent/providers": {
Expand Down
Loading
Loading