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.

refactor: separate flatpak build

Minh14112074c77d7d8542
diff --git a/.github/workflows/jan-tauri-build-flatpak.yaml b/.github/workflows/jan-tauri-build-flatpak.yaml
index 2eded766a..53ff76226 100644
--- a/.github/workflows/jan-tauri-build-flatpak.yaml
+++ b/.github/workflows/jan-tauri-build-flatpak.yaml
@@ -6,15 +6,22 @@ on:
version:
description: 'Version to build. For example: 0.6.8'
required: false
+ public_provider:
+ type: choice
+ description: 'Public Provider'
+ options:
+ - none
+ - aws-s3
+ default: none
jobs:
-
- build-linux-x64:
+ build-linux-x64-flatpak:
uses: ./.github/workflows/template-tauri-build-linux-x64-flatpak.yml
secrets: inherit
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
with:
ref: ${{ github.ref }}
- public_provider: none
- channel: stable
+ public_provider: ${{ inputs.public_provider }}
new_version: ${{ inputs.version }}
+ channel: stable
disable_updater: true
\ No newline at end of file
diff --git a/.github/workflows/jan-tauri-build-nightly.yaml b/.github/workflows/jan-tauri-build-nightly.yaml
index 4e306da8b..1ac2ba16d 100644
--- a/.github/workflows/jan-tauri-build-nightly.yaml
+++ b/.github/workflows/jan-tauri-build-nightly.yaml
@@ -16,6 +16,7 @@ on:
type: boolean
description: 'If true, builds both .deb and .appimage but disables auto-updater'
default: false
+
pull_request:
branches:
- release/**
@@ -106,19 +107,6 @@ jobs:
channel: nightly
cortex_api_port: '39261'
disable_updater: ${{ github.event.inputs.disable_updater == 'true' }}
-
- build-linux-x64-flatpak:
- uses: ./.github/workflows/template-tauri-build-linux-x64-flatpak.yml
- secrets: inherit
- needs: [get-update-version, set-public-provider]
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
- with:
- ref: ${{ needs.set-public-provider.outputs.ref }}
- public_provider: ${{ needs.set-public-provider.outputs.public_provider }}
- new_version: ${{ needs.get-update-version.outputs.new_version }}
- channel: nightly
- cortex_api_port: '39261'
- disable_updater: true
sync-temp-to-latest:
needs:
@@ -127,7 +115,6 @@ jobs:
set-public-provider,
build-windows-x64,
build-linux-x64,
- build-linux-x64-flatpak,
build-macos,
]
runs-on: ubuntu-22.04
diff --git a/.github/workflows/jan-tauri-build.yaml b/.github/workflows/jan-tauri-build.yaml
index d5a9a4c21..6a2b85529 100644
--- a/.github/workflows/jan-tauri-build.yaml
+++ b/.github/workflows/jan-tauri-build.yaml
@@ -66,19 +66,6 @@ jobs:
channel: stable
new_version: ${{ needs.get-update-version.outputs.new_version }}
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
-
- build-linux-x64-flatpak:
- uses: ./.github/workflows/template-tauri-build-linux-x64-flatpak.yml
- secrets: inherit
- needs: [get-update-version, create-draft-release]
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
- with:
- ref: ${{ github.ref }}
- public_provider: github
- channel: stable
- new_version: ${{ needs.get-update-version.outputs.new_version }}
- cortex_api_port: '39261'
- disable_updater: true
sync-temp-to-latest:
needs: [create-draft-release, get-update-version, build-macos, build-windows-x64, build-linux-x64]
diff --git a/.github/workflows/template-tauri-build-linux-x64-flatpak.yml b/.github/workflows/template-tauri-build-linux-x64-flatpak.yml
index 196d9a055..92e9554fc 100644
--- a/.github/workflows/template-tauri-build-linux-x64-flatpak.yml
+++ b/.github/workflows/template-tauri-build-linux-x64-flatpak.yml
@@ -15,10 +15,6 @@ on:
required: true
type: string
default: ''
- cortex_api_port:
- required: false
- type: string
- default: ''
upload_url:
required: false
type: string
@@ -177,13 +173,6 @@ jobs:
name: jan-linux-amd64-flatpak-${{ inputs.new_version }}-deb
path: ./src-tauri/target/release/bundle/deb/*.deb
- - name: Upload Artifact
- if: inputs.public_provider != 'github'
- uses: actions/upload-artifact@v4
- with:
- name: jan-linux-amd64-flatpak-${{ inputs.new_version }}-AppImage
- path: ./src-tauri/target/release/bundle/appimage/*.AppImage
-
## Set output filename for linux
- name: Set output filename for linux
id: packageinfo
@@ -192,20 +181,14 @@ jobs:
if [ "${{ inputs.channel }}" != "stable" ]; then
DEB_FILE_NAME=Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.deb
- APPIMAGE_FILE_NAME=Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.AppImage
DEB_SIG=$(cat deb/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.deb.sig)
- APPIMAGE_SIG=$(cat appimage/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.AppImage.sig)
else
DEB_FILE_NAME=Jan_${{ inputs.new_version }}_amd64.deb
- APPIMAGE_FILE_NAME=Jan_${{ inputs.new_version }}_amd64.AppImage
DEB_SIG=$(cat deb/Jan_${{ inputs.new_version }}_amd64.deb.sig)
- APPIMAGE_SIG=$(cat appimage/Jan_${{ inputs.new_version }}_amd64.AppImage.sig)
fi
echo "DEB_SIG=$DEB_SIG" >> $GITHUB_OUTPUT
- echo "APPIMAGE_SIG=$APPIMAGE_SIG" >> $GITHUB_OUTPUT
echo "DEB_FILE_NAME=$DEB_FILE_NAME" >> $GITHUB_OUTPUT
- echo "APPIMAGE_FILE_NAME=$APPIMAGE_FILE_NAME" >> $GITHUB_OUTPUT
- name: upload to aws s3 if public provider is aws
if: inputs.public_provider == 'aws-s3'