Skip to content

Commit 14d7d86

Browse files
authored
MVP (#7)
1 parent 3c35c67 commit 14d7d86

File tree

371 files changed

+17798
-6958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+17798
-6958
lines changed

.github/workflows/build.yml

Lines changed: 99 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,116 @@ env:
66
on: [push]
77

88
jobs:
9-
build:
10-
runs-on: ubuntu-latest
9+
build-tauri:
10+
name: Build Tauri Application
11+
permissions:
12+
contents: write
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
settings:
17+
- platform: 'ubuntu-22.04'
18+
args: ''
19+
# TODO: maybe target specifically ARM based macs and Intel based macs to reduce built bundle size
20+
# - platform: 'macos-latest' # for Arm based macs (M1 and above).
21+
# args: '--target aarch64-apple-darwin'
22+
# - platform: 'macos-latest' # for Intel based macs.
23+
# args: '--target x86_64-apple-darwin'
24+
- platform: 'macos-latest'
25+
args: '--target universal-apple-darwin'
26+
- platform: 'windows-latest'
27+
args: ''
1128

29+
runs-on: ${{ matrix.settings.platform }}
30+
env:
31+
CI: true
1232
steps:
1333
- uses: actions/checkout@v4
1434

35+
- name: Install Dependencies (Ubuntu only)
36+
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
40+
41+
- name: Set up Node
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: lts/*
45+
cache: 'npm'
46+
1547
- name: Install Rust
1648
uses: dtolnay/rust-toolchain@stable
1749
with:
18-
components: rustfmt, clippy
50+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
51+
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
1952

20-
- name: Setup Node.js
21-
uses: actions/[email protected]
53+
- name: Set up Rust Cache
54+
uses: swatinem/rust-cache@v2
55+
56+
- name: Install Node Dependencies
57+
run: npm install
58+
59+
- uses: tauri-apps/tauri-action@v0
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2262
with:
23-
node-version: '16.x'
63+
releaseBody: 'See the assets to download this version and install.'
64+
releaseDraft: true
65+
prerelease: false
66+
args: ${{ matrix.settings.args }}
2467

25-
- name: Install dependencies
26-
run: |
27-
sudo apt-get update
28-
sudo apt-get install -y libgtk-3-dev \
29-
webkit2gtk-4.0 javascriptcoregtk-4.1 libappindicator3-dev \
30-
librsvg2-dev patchelf libdbus-1-dev \
31-
pkg-config \
68+
# Linux
69+
- name: Upload Linux deb
70+
uses: actions/upload-artifact@v4
71+
if: matrix.settings.platform == 'ubuntu-22.04'
72+
with:
73+
name: ark-rate-desktop_linux_deb
74+
path: ./src-tauri/target/release/bundle/deb/*.deb
3275

33-
- name: Fetch Node.js Dependencies
34-
run: yarn
76+
- name: Upload Linux rpm
77+
uses: actions/upload-artifact@v4
78+
if: matrix.settings.platform == 'ubuntu-22.04'
79+
with:
80+
name: ark-rate-desktop_linux_rpm
81+
path: ./src-tauri/target/release/bundle/rpm/*.rpm
3582

36-
- name: Build Release version
37-
run: yarn tauri build
83+
- name: Upload Linux AppImage
84+
uses: actions/upload-artifact@v4
85+
if: matrix.settings.platform == 'ubuntu-22.04'
86+
with:
87+
name: ark-rate-desktop_linux_appimage
88+
path: ./src-tauri/target/release/bundle/appimage/*.AppImage
89+
# ---
90+
91+
# MacOS
92+
- name: Upload MacOS app
93+
uses: actions/upload-artifact@v4
94+
if: matrix.settings.platform == 'macos-latest'
95+
with:
96+
name: ark-rate-desktop_macos_app
97+
path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app
98+
99+
- name: Upload MacOS dmg
100+
uses: actions/upload-artifact@v4
101+
if: matrix.settings.platform == 'macos-latest'
102+
with:
103+
name: ark-rate-desktop_macos_dmg
104+
path: ./src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg
105+
# ---
106+
107+
# Windows
108+
- name: Upload Windows msi
109+
uses: actions/upload-artifact@v4
110+
if: matrix.settings.platform == 'windows-latest'
111+
with:
112+
name: ark-rate-desktop_windows_msi
113+
path: ./src-tauri/target/release/bundle/msi/*.msi
38114

39-
- name: Upload AppImage
40-
uses: actions/[email protected]
115+
- name: Upload Windows exe
116+
uses: actions/upload-artifact@v4
117+
if: matrix.settings.platform == 'windows-latest'
41118
with:
42-
name: ark-rate-desktop.AppImage
43-
path: ./src-tauri/target/release/bundle/appimage/ark-rate-desktop_*_amd64.AppImage
119+
name: ark-rate-desktop_windows_exe
120+
path: ./src-tauri/target/release/bundle/nsis/*.exe
121+
# ---

.github/workflows/release.yml

Lines changed: 131 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,141 @@
11
name: Release the app
22

3+
env:
4+
CARGO_TERM_COLOR: always
5+
36
on:
47
push:
58
tags:
6-
- '*'
9+
- '*'
710

811
jobs:
9-
release:
12+
linux:
1013
runs-on: ubuntu-latest
1114
environment: Development
1215
steps:
13-
- uses: actions/checkout@v3
14-
15-
- name: Install Rust
16-
uses: actions-rs/toolchain@v1
17-
with:
18-
toolchain: stable
19-
override: true
20-
components: rustfmt, clippy
21-
22-
- name: Setup Node.js
23-
uses: actions/[email protected]
24-
with:
25-
node-version: '16.x'
26-
27-
- name: Install dependencies
28-
run: |
29-
sudo apt-get update
30-
sudo apt-get install -y libgtk-3-dev \
31-
webkit2gtk-4.0 libappindicator3-dev \
32-
librsvg2-dev patchelf libdbus-1-dev \
33-
pkg-config
34-
35-
- name: Fetch Node.js dependencies
36-
run: yarn
37-
38-
- name: Build Release version
39-
run: yarn tauri build
40-
41-
- name: Release AppImage
42-
uses: ncipollo/release-action@v1
43-
with:
44-
artifacts: "./target/release/bundle/appimage/*.AppImage"
45-
token: ${{ secrets.GITHUB_TOKEN }}
16+
- uses: actions/checkout@v4
17+
18+
- name: Install Rust
19+
uses: dtolnay/rust-toolchain@stable
20+
with:
21+
components: rustfmt, clippy
22+
23+
- name: Setup Cargo Cache
24+
uses: Swatinem/rust-cache@v2
25+
with:
26+
save-if: false
27+
28+
- name: Setup Node.js
29+
uses: actions/[email protected]
30+
with:
31+
node-version: '23.x'
32+
33+
- name: Install dependencies
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y libsoup-3.0-dev libwebkit2gtk-4.1-dev libgtk-3-dev \
37+
webkit2gtk-4.0 javascriptcoregtk-4.1 libappindicator3-dev \
38+
librsvg2-dev patchelf libdbus-1-dev \
39+
pkg-config \
40+
41+
- name: Fetch Node.js Dependencies
42+
run: yarn
43+
44+
- name: Build Release version
45+
run: yarn tauri build
46+
47+
- name: Release amd64 deb
48+
uses: ncipollo/release-action@v1
49+
with:
50+
artifacts: ./src-tauri/target/release/bundle/deb/Ark-Rate-Desktop*amd64*.deb
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Release x86_64 rpm
54+
uses: ncipollo/release-action@v1
55+
with:
56+
artifacts: ./src-tauri/target/release/bundle/rpm/Ark-Rate-Desktop*x86_64*.rpm
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Release amd64 AppImage
60+
uses: ncipollo/release-action@v1
61+
with:
62+
artifacts: ./src-tauri/target/release/bundle/appimage/Ark-Rate-Desktop*amd64*.AppImage
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
65+
macos:
66+
runs-on: macos-latest
67+
environment: Development
68+
steps:
69+
- uses: actions/checkout@v4
70+
71+
- name: Install Rust
72+
uses: dtolnay/rust-toolchain@stable
73+
with:
74+
components: rustfmt, clippy
75+
76+
- name: Setup Cargo Cache
77+
uses: Swatinem/rust-cache@v2
78+
with:
79+
save-if: false
80+
81+
- name: Setup Node.js
82+
uses: actions/[email protected]
83+
with:
84+
node-version: '23.x'
85+
86+
- name: Fetch Node.js Dependencies
87+
run: yarn
88+
89+
- name: Build Release version
90+
run: yarn tauri build
91+
92+
- name: Release app
93+
uses: ncipollo/release-action@v1
94+
with:
95+
artifacts: ./src-tauri/target/release/bundle/macos/Ark-Rate-Desktop*.app
96+
token: ${{ secrets.GITHUB_TOKEN }}
97+
98+
- name: Release aarch64 dmg
99+
uses: ncipollo/release-action@v1
100+
with:
101+
artifacts: ./src-tauri/target/release/bundle/dmg/Ark-Rate-Desktop*aarch64*.dmg
102+
token: ${{ secrets.GITHUB_TOKEN }}
103+
104+
windows:
105+
runs-on: windows-latest
106+
environment: Development
107+
steps:
108+
- uses: actions/checkout@v4
109+
110+
- name: Install Rust
111+
uses: dtolnay/rust-toolchain@stable
112+
with:
113+
components: rustfmt, clippy
114+
115+
- name: Setup Cargo Cache
116+
uses: Swatinem/rust-cache@v2
117+
with:
118+
save-if: false
119+
120+
- name: Setup Node.js
121+
uses: actions/[email protected]
122+
with:
123+
node-version: '23.x'
124+
125+
- name: Fetch Node.js Dependencies
126+
run: yarn
127+
128+
- name: Build Release version
129+
run: yarn tauri build
130+
131+
- name: Release x64 msi
132+
uses: ncipollo/release-action@v1
133+
with:
134+
artifacts: ./src-tauri/target/release/bundle/msi/Ark-Rate-Desktop*x64*.msi
135+
token: ${{ secrets.GITHUB_TOKEN }}
136+
137+
- name: Release x64 exe
138+
uses: ncipollo/release-action@v1
139+
with:
140+
artifacts: ./src-tauri/target/release/bundle/nsis/Ark-Rate-Desktop*x64*.exe
141+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
/.svelte-kit
1415

1516
# Editor directories and files
1617
.vscode/*

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore files for PNPM, NPM and YARN
2+
pnpm-lock.yaml
3+
package-lock.json
4+
yarn.lock
5+
6+
src-tauri

.prettierrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false,
4+
"printWidth": 120,
5+
"singleQuote": true,
6+
"trailingComma": "es5",
7+
"singleAttributePerLine": true,
8+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
9+
"overrides": [
10+
{
11+
"files": "*.svelte",
12+
"options": {
13+
"parser": "svelte"
14+
}
15+
}
16+
]
17+
}

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
2+
"recommendations": ["svelte.svelte-vscode", "tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
33
}

README.md

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
1-
# Ark-Rate Desktop App
1+
# Tauri + SvelteKit + TypeScript
22

3-
Get started with currency rate conversions from your desktop.
3+
This template should help get you started developing with Tauri, SvelteKit and TypeScript in Vite.
44

55
## Recommended IDE Setup
66

7-
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
8-
9-
## Getting Started
10-
11-
All the prerequisites mentioned below are taken from the [official documentation](https://tauri.app/v1/guides/getting-started/prerequisites/).
12-
### Prerequisites for Windows
13-
- Install [Microsoft Visual Studio C++ Build Tools](https://tauri.app/v1/guides/getting-started/prerequisites/#1-microsoft-visual-studio-c-build-tools),
14-
- Install [WebView2](https://tauri.app/v1/guides/getting-started/prerequisites/#2-webview2),
15-
- Install [Rust](https://www.rust-lang.org/tools/install)
16-
17-
### Prerequisites for Linux
18-
- Make sure to install all the Linux-specific dependencies listed [here](https://tauri.app/v1/guides/getting-started/prerequisites/#1-system-dependencies),
19-
- Install [Rust](https://tauri.app/v1/guides/getting-started/prerequisites/#2-rust-1)
20-
21-
### Prerequisites for MacOS
22-
- Install [CLang and MacOS-specific dependencies](https://tauri.app/v1/guides/getting-started/prerequisites/#1-clang-and-macos-development-dependencies),
23-
- Install [Rust](https://tauri.app/v1/guides/getting-started/prerequisites/#2-rust)
24-
25-
## To Run and build the app
26-
27-
For OS-specific instructions, follow the steps provided [here](https://tauri.app/v1/guides/building/).
28-
29-
You can use any package managers such as `yarn`, `npm`, `pnpm`, etc. But the below steps will use `yarn` for demonstration purposes.
30-
31-
1. Install all the packages: `yarn`
32-
33-
2. Run the Tauri app in development mode: `yarn tauri dev`
34-
35-
3. To build the app, run: `yarn tauri build`. <br>
7+
[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer).

0 commit comments

Comments
 (0)