Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

ci: pass JAN_SIGNING_KEY to the agent CLI builds

Minh1411200c4d74a88e51
diff --git a/.github/workflows/template-cli-build-linux-aarch64.yml b/.github/workflows/template-cli-build-linux-aarch64.yml
index a9e3dd67b..3fdea1f51 100644
--- a/.github/workflows/template-cli-build-linux-aarch64.yml
+++ b/.github/workflows/template-cli-build-linux-aarch64.yml
@@ -25,6 +25,11 @@ on:
required: false
DELTA_AWS_REGION:
required: false
+ # Baked into the binary at compile time via option_env!; without it the
+ # released CLI falls back to the local-dev key and its signed requests
+ # are rejected.
+ JAN_SIGNING_KEY:
+ required: false
outputs:
FILE_NAME:
value: ${{ jobs.build-linux-aarch64.outputs.FILE_NAME }}
@@ -79,6 +84,7 @@ jobs:
env:
JAN_CLI_UPDATE_CHANNEL: ${{ inputs.channel }}
JAN_CLI_BUILD_VERSION: ${{ inputs.new_version }}
+ JAN_SIGNING_KEY: ${{ secrets.JAN_SIGNING_KEY }}
run: |
cd src-tauri
cargo build --no-default-features --features cli --bin jan --release
diff --git a/.github/workflows/template-cli-build-linux-x64.yml b/.github/workflows/template-cli-build-linux-x64.yml
index c33cf8742..eb6e2ea12 100644
--- a/.github/workflows/template-cli-build-linux-x64.yml
+++ b/.github/workflows/template-cli-build-linux-x64.yml
@@ -25,6 +25,11 @@ on:
required: false
DELTA_AWS_REGION:
required: false
+ # Baked into the binary at compile time via option_env!; without it the
+ # released CLI falls back to the local-dev key and its signed requests
+ # are rejected.
+ JAN_SIGNING_KEY:
+ required: false
outputs:
FILE_NAME:
value: ${{ jobs.build-linux-x64.outputs.FILE_NAME }}
@@ -88,6 +93,7 @@ jobs:
env:
JAN_CLI_UPDATE_CHANNEL: ${{ inputs.channel }}
JAN_CLI_BUILD_VERSION: ${{ inputs.new_version }}
+ JAN_SIGNING_KEY: ${{ secrets.JAN_SIGNING_KEY }}
run: |
cd src-tauri
cargo build --no-default-features --features cli --bin jan --release
diff --git a/.github/workflows/template-cli-build-macos.yml b/.github/workflows/template-cli-build-macos.yml
index 9c1186961..5ad0308a0 100644
--- a/.github/workflows/template-cli-build-macos.yml
+++ b/.github/workflows/template-cli-build-macos.yml
@@ -25,6 +25,11 @@ on:
required: false
DELTA_AWS_REGION:
required: false
+ # Baked into the binary at compile time via option_env!; without it the
+ # released CLI falls back to the local-dev key and its signed requests
+ # are rejected.
+ JAN_SIGNING_KEY:
+ required: false
# Optional code signing
CODE_SIGN_P12_BASE64:
required: false
@@ -67,6 +72,7 @@ jobs:
env:
JAN_CLI_UPDATE_CHANNEL: ${{ inputs.channel }}
JAN_CLI_BUILD_VERSION: ${{ inputs.new_version }}
+ JAN_SIGNING_KEY: ${{ secrets.JAN_SIGNING_KEY }}
run: |
cd src-tauri
cargo build --no-default-features --features cli --bin jan --release --target x86_64-apple-darwin
@@ -75,6 +81,7 @@ jobs:
env:
JAN_CLI_UPDATE_CHANNEL: ${{ inputs.channel }}
JAN_CLI_BUILD_VERSION: ${{ inputs.new_version }}
+ JAN_SIGNING_KEY: ${{ secrets.JAN_SIGNING_KEY }}
run: |
cd src-tauri
cargo build --no-default-features --features cli --bin jan --release --target aarch64-apple-darwin
diff --git a/.github/workflows/template-cli-build-windows-x64.yml b/.github/workflows/template-cli-build-windows-x64.yml
index 0f5a4608d..101cc1652 100644
--- a/.github/workflows/template-cli-build-windows-x64.yml
+++ b/.github/workflows/template-cli-build-windows-x64.yml
@@ -25,6 +25,11 @@ on:
required: false
DELTA_AWS_REGION:
required: false
+ # Baked into the binary at compile time via option_env!; without it the
+ # released CLI falls back to the local-dev key and its signed requests
+ # are rejected.
+ JAN_SIGNING_KEY:
+ required: false
outputs:
FILE_NAME:
value: ${{ jobs.build-windows-x64.outputs.FILE_NAME }}
@@ -55,6 +60,7 @@ jobs:
env:
JAN_CLI_UPDATE_CHANNEL: ${{ inputs.channel }}
JAN_CLI_BUILD_VERSION: ${{ inputs.new_version }}
+ JAN_SIGNING_KEY: ${{ secrets.JAN_SIGNING_KEY }}
run: |
cd src-tauri
cargo build --no-default-features --features cli --bin jan --release