Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dependency): upgrade to tauri 2 #35

Merged
merged 24 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
- main

env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
VITE_CLIENT_SECRET: ${{ secrets.VITE_CLIENT_SECRET }}
VITE_CLIENT_ID: ${{ secrets.VITE_CLIENT_ID }}
CI: true
Expand All @@ -21,7 +21,7 @@ jobs:
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-20.04' # for Tauri v1 you could replace this with ubuntu-20.04.
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-22.04.
args: ''
- platform: 'windows-latest'
args: ''
Expand All @@ -36,7 +36,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
node-version: v22.11.0
cache: 'pnpm' # Set this to npm, yarn or pnpm.

- name: install Rust stable
Expand All @@ -51,21 +51,21 @@ jobs:
workspaces: './src-tauri -> target'

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04' # This must match the platform value defined above.
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 libappindicator3-dev librsvg2-dev patchelf
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.

- name: install app dependencies
run: pnpm install

- uses: tauri-apps/tauri-action@v0
- uses: tauri-apps/tauri-action@v0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
VITE_CLIENT_SECRET: ${{ secrets.VITE_CLIENT_SECRET }}
VITE_CLIENT_ID: ${{ secrets.VITE_CLIENT_ID }}
CI: true
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: 'test-on-pr'
on: [pull_request]

env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
VITE_CLIENT_SECRET: ${{ secrets.VITE_CLIENT_SECRET }}
VITE_CLIENT_ID: ${{ secrets.VITE_CLIENT_ID }}

Expand All @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
platform: [macos-latest, ubuntu-22.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -24,28 +24,28 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
node-version: v22.11.0

- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 libappindicator3-dev librsvg2-dev patchelf

- name: install app dependencies and build it
run: |
run: |
pnpm i
pnpm lint
pnpm tauri:build
- uses: tauri-apps/tauri-action@v0
- uses: tauri-apps/tauri-action@v0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
VITE_CLIENT_SECRET: ${{ secrets.VITE_CLIENT_SECRET }}
VITE_CLIENT_ID: ${{ secrets.VITE_CLIENT_ID }}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ dist-ssr
.env

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
Expand Down
53 changes: 29 additions & 24 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,34 @@ import globals from 'globals';
import ts from 'typescript-eslint';

export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.svelte'],
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ['**/*.svelte'],

languageOptions: {
parserOptions: {
parser: ts.parser
}
}
},
{
ignores: ['build/', '.svelte-kit/', 'dist/']
}
languageOptions: {
parserOptions: {
parser: ts.parser,
},
},
},
{
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
},
{
ignores: ['build/', '.svelte-kit/', 'dist/'],
}
);
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,35 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"tauri:dev": "tauri dev",
"tauri:dev": "RUST_BACKTRACE=1 tauri dev",
"tauri:build": "tauri build",
"check": "svelte-check --tsconfig ./tsconfig.json",
"bump": "sh ./bump.sh",
"format": "prettier --write ./src",
"lint": "eslint --config ./eslint.config.js ./src"
},
"dependencies": {
"@tauri-apps/api": "^1.6.0",
"@tauri-apps/api": "^2.0.3",
"@tauri-apps/plugin-autostart": "~2",
"@tauri-apps/plugin-http": "~2",
"@tauri-apps/plugin-notification": "~2",
"@tauri-apps/plugin-shell": "~2",
"@tauri-apps/plugin-updater": "~2",
"bits-ui": "1.0.0-next.45",
"clsx": "2.1.1",
"svelte": "^5.1.12",
"tailwind-merge": "2.5.3",
"tailwind-variants": "0.2.1"
},
"engines": {
"node": "v22.9.0"
"node": "v22.11.0"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"@sveltejs/adapter-static": "^3.0.6",
"@sveltejs/kit": "^2.8.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@tauri-apps/cli": "^1.6.3",
"@tauri-apps/cli": "^2.0.4",
"@tsconfig/svelte": "5.0.4",
"@types/node": "22.9.0",
"@typescript-eslint/parser": "^8.13.0",
Expand Down
Loading
Loading