-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from fluentci-io/feat/electron
feat: add desktop version for MacOS and Linux
- Loading branch information
Showing
31 changed files
with
1,139 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: release desktop app for mac arm64 | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Fluent CI and build webui | ||
uses: fluentci-io/setup-fluentci@v5 | ||
with: | ||
wasm: true | ||
pipeline: bun | ||
args: | | ||
run build | ||
working-directory: webui | ||
env: | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
- name: List files | ||
run: ls -ltr release/* | ||
working-directory: webui | ||
- name: Upload assets to Cloudflare R2 | ||
run: | | ||
mkdir -p r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cp fluentci-studio_*_arm64.dmg r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cp fluentci-studio_*_arm64.zip r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cd r2 && fluentci run --wasm r2-sync upload --endpoint-url https://$ACCOUNT_ID.r2.cloudflarestorage.com s3://assets | ||
env: | ||
TAG: ${{ env.RELEASE_VERSION }} | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
ACCOUNT_ID: fe5b1e2ce9f94f4c0415ab94ce402012 | ||
- name: Upload release assets | ||
run: | | ||
for ext in dmg zip; do | ||
export FILE=fluentci-studio_*_arm64.$ext | ||
fluentci run --wasm github release_upload $TAG $FILE | ||
done | ||
env: | ||
TAG: ${{ env.RELEASE_VERSION }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: release desktop app for mac x86_64 | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Fluent CI and build webui | ||
uses: fluentci-io/setup-fluentci@v5 | ||
with: | ||
wasm: true | ||
pipeline: bun | ||
args: | | ||
run build | ||
working-directory: webui | ||
env: | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
- name: List files | ||
run: ls -ltr release/* | ||
working-directory: webui | ||
- name: Upload assets to Cloudflare R2 | ||
run: | | ||
mkdir -p r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cp fluentci-studio_*_x64.dmg r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cp fluentci-studio_*_x64.zip r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cd r2 && fluentci run --wasm r2-sync upload --endpoint-url https://$ACCOUNT_ID.r2.cloudflarestorage.com s3://assets | ||
env: | ||
TAG: ${{ env.RELEASE_VERSION }} | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
ACCOUNT_ID: fe5b1e2ce9f94f4c0415ab94ce402012 | ||
- name: Upload release assets | ||
run: | | ||
for ext in dmg zip; do | ||
export FILE=fluentci-studio_*_x64.$ext | ||
fluentci run --wasm github release_upload $TAG $FILE | ||
done | ||
env: | ||
TAG: ${{ env.RELEASE_VERSION }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: release desktop app for linux | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Fluent CI and build webui | ||
uses: fluentci-io/setup-fluentci@v5 | ||
with: | ||
wasm: true | ||
pipeline: bun | ||
args: | | ||
run build | ||
working-directory: webui | ||
env: | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
- name: List files | ||
run: ls -ltr release/* | ||
working-directory: webui | ||
- name: Upload assets to Cloudflare R2 | ||
run: | | ||
mkdir -p r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cp fluentci-studio-*.AppImage r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cp fluentci-studio-*.tar.gz r2/fluentci-studio/${{ env.RELEASE_VERSION }} | ||
cd r2 && fluentci run --wasm r2-sync upload --endpoint-url https://$ACCOUNT_ID.r2.cloudflarestorage.com s3://assets | ||
env: | ||
TAG: ${{ env.RELEASE_VERSION }} | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
ACCOUNT_ID: fe5b1e2ce9f94f4c0415ab94ce402012 | ||
- name: Upload release assets | ||
run: | | ||
for ext in tar.gz AppImage; do | ||
export FILE=fluentci-studio-*.$ext | ||
fluentci run --wasm github release_upload $TAG $FILE | ||
done | ||
env: | ||
TAG: ${{ env.RELEASE_VERSION }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* @see https://www.electron.build/configuration/configuration | ||
*/ | ||
{ | ||
appId: "io.fluentci.app", | ||
asar: true, | ||
directories: { | ||
output: "release/${version}", | ||
}, | ||
files: ["dist-electron", "dist"], | ||
mac: { | ||
icon: "assets/icon.png", | ||
artifactName: "${productName}_${version}_${arch}.${ext}", | ||
target: ["dmg", "zip"], | ||
}, | ||
linux: { | ||
icon: "assets/icon.png", | ||
target: ["AppImage", "tar.gz"], | ||
}, | ||
nsis: { | ||
oneClick: false, | ||
perMachine: false, | ||
allowToChangeInstallationDirectory: true, | ||
deleteAppDataOnUninstall: false, | ||
}, | ||
publish: { | ||
provider: "generic", | ||
channel: "latest", | ||
url: "https://github.com/fluentci-io/fluentci-studio/releases/download/v0.1.0/", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/// <reference types="vite-electron-plugin/electron-env" /> | ||
|
||
declare namespace NodeJS { | ||
interface ProcessEnv { | ||
VSCODE_DEBUG?: 'true' | ||
/** | ||
* The built directory structure | ||
* | ||
* ```tree | ||
* βββ¬ dist-electron | ||
* β βββ¬ main | ||
* β β βββ index.js > Electron-Main | ||
* β βββ¬ preload | ||
* β βββ index.mjs > Preload-Scripts | ||
* βββ¬ dist | ||
* β βββ index.html > Electron-Renderer | ||
* ``` | ||
*/ | ||
APP_ROOT: string | ||
/** /dist/ or /public/ */ | ||
VITE_PUBLIC: string | ||
} | ||
} |
Oops, something went wrong.