-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add trin-desktop & github action
- Loading branch information
1 parent
3fc5130
commit 64eacf2
Showing
146 changed files
with
22,173 additions
and
0 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,66 @@ | ||
name: Desktop | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
publish-tauri: | ||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- platform: 'macos-latest' # for Arm based macs (M1 and above). | ||
args: '--target aarch64-apple-darwin' | ||
- platform: 'macos-latest' # for Intel based macs. | ||
args: '--target x86_64-apple-darwin' | ||
- platform: 'ubuntu-22.04' | ||
args: '' | ||
- platform: 'windows-latest' | ||
args: '' | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
# Specify the directory where package.json is located | ||
cache-dependency-path: './trin-desktop/package.json' | ||
|
||
- name: install Rust stable | ||
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly | ||
with: | ||
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. | ||
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | ||
|
||
- name: Rust cache | ||
uses: swatinem/rust-cache@v2 | ||
with: | ||
workspaces: './trin-desktop/src-tauri -> target' | ||
|
||
- name: install frontend dependencies | ||
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. | ||
run: npm install | ||
working-directory: ./trin-desktop | ||
|
||
- uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
projectPath: './trin-desktop' | ||
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. | ||
releaseName: 'App v__VERSION__' | ||
releaseBody: 'See the assets to download this version and install.' | ||
releaseDraft: true | ||
prerelease: true | ||
args: ${{ matrix.args }} |
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
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,10 @@ | ||
# Tauri + Vue 3 | ||
|
||
This template should help get you started developing with Tauri + Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more. | ||
|
||
## Dev... | ||
|
||
- `npm install` | ||
- `npm run tauri dev` | ||
- `npm run lint` (optional) | ||
- `https://www.shadcn-vue.com/docs/introduction.html` for all the js components |
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,18 @@ | ||
{ | ||
"$schema": "https://shadcn-vue.com/schema.json", | ||
"style": "new-york", | ||
"typescript": false, | ||
"tsConfigPath": "./jsconfig.json", | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/assets/index.css", | ||
"baseColor": "slate", | ||
"cssVariables": true, | ||
"prefix": "" | ||
}, | ||
"framework": "vite", | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} |
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,8 @@ | ||
// .eslintrc.cjs | ||
module.exports = { | ||
rules: { | ||
'vue/multi-word-component-names': 'off', | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' | ||
} | ||
} |
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,14 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Trin Desktop App</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</html> |
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,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
}, | ||
"target": "es2020", | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"jsx": "preserve" | ||
}, | ||
"exclude": ["node_modules", "dist"] | ||
} |
Oops, something went wrong.