Skip to content

Commit

Permalink
feat: upgrade release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dancixx committed Sep 8, 2024
1 parent e8845f0 commit 0f91faf
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 20 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,48 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16
node-version: lts/*
cache: 'yarn'

- name: install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-04 # 1.80.0-nightly (e82c861d7 2024-05-04)
target: wasm32-unknown-unknown
default: true
targets: wasm32-unknown-unknown,${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: install Tauri cli
run: cargo install tauri-cli

- name: install Tailwind CSS
run: npm i -g tailwindcss

- name: generate Tailwind CSS
run: npx tailwindcss -i ./input.css -o ./style/output.css

- uses: jetli/[email protected]
with:
# Optional version of trunk to install(eg. 'v0.8.1', 'latest')
version: "latest"

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: build in release mode
run: cargo tauri build

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
9 changes: 2 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ async-stream = "0.3.5"
icondata = "0.3.0"
ahash = { version = "0.8.11", features = ["serde"] }
leptos_toaster = { version = "0.1.6", features = ["builtin_toast"] }
proc-macro2 = "1.0.82"
quote = "1.0.36"
syn = { version = "2.0.64", features = ["full"] }
chrono = "0.4.38"
proc-macros = { path = "./proc-macros" }


[workspace]
members = ["src-tauri", "common"]

[lib]
proc-macro = true
members = ["src-tauri", "common", "proc-macros"]
13 changes: 13 additions & 0 deletions proc-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "proc-macros"
version = "0.1.0"
edition = "2021"

[dependencies]
proc-macro2 = "1.0.86"
quote = "1.0.37"
syn = "2.0.77"

[lib]
name = "rsql_proc_macros"
proc-macro = true
1 change: 0 additions & 1 deletion src/lib.rs → proc-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,3 @@ pub fn into_iterator_derive(input: TokenStream) -> TokenStream {

gen.into()
}

3 changes: 1 addition & 2 deletions src/databases/pgsql/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use common::{
types::pgsql::{PgsqlLoadSchemas, PgsqlLoadTables, PgsqlRunQuery},
};
use leptos::{error::Result, expect_context, RwSignal, SignalGet, SignalSet, SignalUpdate};
use rsql::set_running_query;
use rsql_proc_macros::set_running_query;
use tauri_sys::tauri::invoke;

use crate::{
Expand Down Expand Up @@ -182,4 +182,3 @@ impl<'a> Pgsql<'a> {
});
}
}

3 changes: 1 addition & 2 deletions src/store/atoms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::VecDeque;

use common::enums::Drivers;
use leptos::RwSignal;
use rsql::StructIntoIterator;
use rsql_proc_macros::StructIntoIterator;

#[derive(Debug, Default, Clone)]
pub struct QueryPerformanceAtom {
Expand Down Expand Up @@ -59,4 +59,3 @@ impl Default for PgsqlConnectionDetailsAtom {
}

pub type PgsqlConnectionDetailsContext = RwSignal<PgsqlConnectionDetailsAtom>;

3 changes: 1 addition & 2 deletions src/store/tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{cell::RefCell, rc::Rc};
use common::enums::ProjectConnectionStatus;
use leptos::{create_rw_signal, expect_context, RwSignal, SignalGet, SignalSet, SignalUpdate};
use monaco::api::CodeEditor;
use rsql::set_running_query;
use rsql_proc_macros::set_running_query;
use tauri_sys::tauri::invoke;

use crate::{
Expand Down Expand Up @@ -242,4 +242,3 @@ impl TabsStore {
None
}
}

0 comments on commit 0f91faf

Please sign in to comment.