Skip to content

Commit 0f91faf

Browse files
committed
feat: upgrade release.yml
1 parent e8845f0 commit 0f91faf

File tree

7 files changed

+38
-20
lines changed

7 files changed

+38
-20
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,48 @@ jobs:
1616
runs-on: ${{ matrix.platform }}
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
20+
2021
- name: setup node
21-
uses: actions/setup-node@v1
22+
uses: actions/setup-node@v4
2223
with:
23-
node-version: 16
24+
node-version: lts/*
25+
cache: 'yarn'
26+
2427
- name: install Rust
25-
uses: actions-rs/toolchain@v1
28+
uses: dtolnay/rust-toolchain@stable
2629
with:
2730
toolchain: nightly-2024-05-04 # 1.80.0-nightly (e82c861d7 2024-05-04)
28-
target: wasm32-unknown-unknown
29-
default: true
31+
targets: wasm32-unknown-unknown,${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
32+
3033
- name: install Tauri cli
3134
run: cargo install tauri-cli
35+
3236
- name: install Tailwind CSS
3337
run: npm i -g tailwindcss
38+
3439
- name: generate Tailwind CSS
3540
run: npx tailwindcss -i ./input.css -o ./style/output.css
41+
3642
- uses: jetli/[email protected]
3743
with:
3844
# Optional version of trunk to install(eg. 'v0.8.1', 'latest')
3945
version: "latest"
46+
4047
- name: install dependencies (ubuntu only)
4148
if: matrix.platform == 'ubuntu-22.04'
4249
run: |
4350
sudo apt-get update
4451
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
52+
53+
- name: Rust cache
54+
uses: swatinem/rust-cache@v2
55+
with:
56+
workspaces: './src-tauri -> target'
57+
4558
- name: build in release mode
4659
run: cargo tauri build
60+
4761
- uses: tauri-apps/tauri-action@v0
4862
env:
4963
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,9 @@ async-stream = "0.3.5"
2424
icondata = "0.3.0"
2525
ahash = { version = "0.8.11", features = ["serde"] }
2626
leptos_toaster = { version = "0.1.6", features = ["builtin_toast"] }
27-
proc-macro2 = "1.0.82"
28-
quote = "1.0.36"
29-
syn = { version = "2.0.64", features = ["full"] }
3027
chrono = "0.4.38"
28+
proc-macros = { path = "./proc-macros" }
3129

3230

3331
[workspace]
34-
members = ["src-tauri", "common"]
35-
36-
[lib]
37-
proc-macro = true
32+
members = ["src-tauri", "common", "proc-macros"]

proc-macros/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "proc-macros"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
proc-macro2 = "1.0.86"
8+
quote = "1.0.37"
9+
syn = "2.0.77"
10+
11+
[lib]
12+
name = "rsql_proc_macros"
13+
proc-macro = true

src/lib.rs renamed to proc-macros/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,3 @@ pub fn into_iterator_derive(input: TokenStream) -> TokenStream {
7676

7777
gen.into()
7878
}
79-

src/databases/pgsql/driver.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use common::{
44
types::pgsql::{PgsqlLoadSchemas, PgsqlLoadTables, PgsqlRunQuery},
55
};
66
use leptos::{error::Result, expect_context, RwSignal, SignalGet, SignalSet, SignalUpdate};
7-
use rsql::set_running_query;
7+
use rsql_proc_macros::set_running_query;
88
use tauri_sys::tauri::invoke;
99

1010
use crate::{
@@ -182,4 +182,3 @@ impl<'a> Pgsql<'a> {
182182
});
183183
}
184184
}
185-

src/store/atoms.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::collections::VecDeque;
22

33
use common::enums::Drivers;
44
use leptos::RwSignal;
5-
use rsql::StructIntoIterator;
5+
use rsql_proc_macros::StructIntoIterator;
66

77
#[derive(Debug, Default, Clone)]
88
pub struct QueryPerformanceAtom {
@@ -59,4 +59,3 @@ impl Default for PgsqlConnectionDetailsAtom {
5959
}
6060

6161
pub type PgsqlConnectionDetailsContext = RwSignal<PgsqlConnectionDetailsAtom>;
62-

src/store/tabs.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{cell::RefCell, rc::Rc};
33
use common::enums::ProjectConnectionStatus;
44
use leptos::{create_rw_signal, expect_context, RwSignal, SignalGet, SignalSet, SignalUpdate};
55
use monaco::api::CodeEditor;
6-
use rsql::set_running_query;
6+
use rsql_proc_macros::set_running_query;
77
use tauri_sys::tauri::invoke;
88

99
use crate::{
@@ -242,4 +242,3 @@ impl TabsStore {
242242
None
243243
}
244244
}
245-

0 commit comments

Comments
 (0)