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.

chore: add upload artifact steps for 3 platforms

Minh14112065a515a9dbd0
diff --git a/.github/workflows/template-tauri-build-linux-x64-external.yml b/.github/workflows/template-tauri-build-linux-x64-external.yml
index dcac53800..3a243530e 100644
--- a/.github/workflows/template-tauri-build-linux-x64-external.yml
+++ b/.github/workflows/template-tauri-build-linux-x64-external.yml
@@ -42,11 +42,13 @@ jobs:
sudo apt-get clean
echo "Disk space after cleanup:"
df -h
+
- name: Replace Icons for Beta Build
if: inputs.channel != 'stable'
shell: bash
run: |
cp .github/scripts/icon-${{ inputs.channel }}.png src-tauri/icons/icon.png
+
- name: Installing node
uses: actions/setup-node@v1
with:
@@ -58,10 +60,12 @@ jobs:
- name: Install ctoml
run: |
cargo install ctoml
+
- name: Install Tauri dependencies
run: |
sudo apt update
sudo apt install -y libglib2.0-dev libatk1.0-dev libpango1.0-dev libgtk-3-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev librsvg2-dev libfuse2
+
- name: Update app version
run: |
echo "Version: ${{ inputs.new_version }}"
@@ -74,8 +78,10 @@ jobs:
fi
jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json
mv /tmp/package.json web-app/package.json
+
ctoml ./src-tauri/Cargo.toml dependencies.tauri.features[] "devtools"
ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"
+
if [ "${{ inputs.channel }}" != "stable" ]; then
jq '.plugins.updater.endpoints = ["https://delta.jan.ai/${{ inputs.channel }}/latest.json"]' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
@@ -86,9 +92,23 @@ jobs:
chmod +x .github/scripts/rename-workspace.sh
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
fi
+
- name: Build app
run: |
make build
+
env:
RELEASE_CHANNEL: '${{ inputs.channel }}'
- AUTO_UPDATER_DISABLED: ${{ inputs.disable_updater && 'true' || 'false' }}
\ No newline at end of file
+ AUTO_UPDATER_DISABLED: ${{ inputs.disable_updater && 'true' || 'false' }}
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: jan-linux-amd64-${{ inputs.new_version }}-deb
+ path: ./src-tauri/target/release/bundle/deb/*.deb
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: jan-linux-amd64-${{ inputs.new_version }}-AppImage
+ path: ./src-tauri/target/release/bundle/appimage/*.AppImage
\ No newline at end of file
diff --git a/.github/workflows/template-tauri-build-macos-external.yml b/.github/workflows/template-tauri-build-macos-external.yml
index 377199ecb..e69e298a6 100644
--- a/.github/workflows/template-tauri-build-macos-external.yml
+++ b/.github/workflows/template-tauri-build-macos-external.yml
@@ -29,6 +29,7 @@ jobs:
shell: bash
run: |
cp .github/scripts/icon-${{ inputs.channel }}.png src-tauri/icons/icon.png
+
- name: Installing node
uses: actions/setup-node@v1
with:
@@ -40,6 +41,7 @@ jobs:
- name: Install ctoml
run: |
cargo install ctoml
+
- name: Create bun and uv universal
run: |
mkdir -p ./src-tauri/resources/bin/
@@ -52,6 +54,7 @@ jobs:
cp -f bun-darwin-aarch64/bun bun-aarch64-apple-darwin
cp -f bun-darwin-x64/bun bun-x86_64-apple-darwin
cp -f bun-universal-apple-darwin bun
+
curl -L -o uv-x86_64.tar.gz https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86_64-apple-darwin.tar.gz
curl -L -o uv-arm64.tar.gz https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-apple-darwin.tar.gz
tar -xzf uv-x86_64.tar.gz
@@ -63,6 +66,7 @@ jobs:
cp -f uv-aarch64/uv uv-aarch64-apple-darwin
cp -f uv-universal-apple-darwin uv
ls -la
+
- name: Update app version
run: |
echo "Version: ${{ inputs.new_version }}"
@@ -82,9 +86,17 @@ jobs:
chmod +x .github/scripts/rename-workspace.sh
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
fi
+
- name: Build app
run: |
rustup target add x86_64-apple-darwin
make build
env:
- APP_PATH: '.'
\ No newline at end of file
+ APP_PATH: '.'
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: jan-${{ inputs.channel }}-mac-universal-${{ inputs.new_version }}.dmg
+ path: |
+ ./src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg
\ No newline at end of file
diff --git a/.github/workflows/template-tauri-build-windows-x64-external.yml b/.github/workflows/template-tauri-build-windows-x64-external.yml
index 8e16dcebf..59a200093 100644
--- a/.github/workflows/template-tauri-build-windows-x64-external.yml
+++ b/.github/workflows/template-tauri-build-windows-x64-external.yml
@@ -114,4 +114,11 @@ jobs:
- name: Build app
shell: bash
run: |
- make build
\ No newline at end of file
+ make build
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: jan-windows-${{ inputs.new_version }}
+ path: |
+ ./src-tauri/target/release/bundle/nsis/*.exe
\ No newline at end of file