diff --git a/.changes/cli-plugin-init-no-github-by-default.md b/.changes/cli-plugin-init-no-github-by-default.md new file mode 100644 index 000000000000..fc80edfb133a --- /dev/null +++ b/.changes/cli-plugin-init-no-github-by-default.md @@ -0,0 +1,7 @@ +--- +"tauri-cli": "patch:breaking" +"@tauri-apps/cli": "patch:breaking" +--- + +`tauri plugin init/new` will no longer generate a `.github` directory with workflows by default, instead use the new `--github-workflows` flag. + diff --git a/.changes/cli-plugin-init-no-github.md b/.changes/cli-plugin-init-no-github.md new file mode 100644 index 000000000000..ce25c8faf0cd --- /dev/null +++ b/.changes/cli-plugin-init-no-github.md @@ -0,0 +1,7 @@ +--- +"tauri-cli": "patch:feat" +"@tauri-apps/cli": "patch:feat" +--- + +Add `--github-workflows` flag for `tauri plugin new/init`. + diff --git a/crates/tauri-cli/src/plugin/init.rs b/crates/tauri-cli/src/plugin/init.rs index 238283b3e008..06317be77f08 100644 --- a/crates/tauri-cli/src/plugin/init.rs +++ b/crates/tauri-cli/src/plugin/init.rs @@ -56,6 +56,9 @@ pub struct Options { #[clap(long)] #[clap(default_value_t = PluginIosFramework::default())] pub(crate) ios_framework: PluginIosFramework, + /// Generate github workflows + #[clap(long)] + pub(crate) github_workflows: bool, /// Initializes a Tauri core plugin (internal usage) #[clap(long, hide(true))] @@ -193,6 +196,7 @@ pub fn command(mut options: Options) -> Result<()> { return Ok(None); } } + ".github" if !options.github_workflows => return Ok(None), "android" => { if options.android || options.mobile { return generate_android_out_file( diff --git a/crates/tauri-cli/src/plugin/new.rs b/crates/tauri-cli/src/plugin/new.rs index 55205858767a..3e000d43ad86 100644 --- a/crates/tauri-cli/src/plugin/new.rs +++ b/crates/tauri-cli/src/plugin/new.rs @@ -37,6 +37,9 @@ pub struct Options { #[clap(long)] #[clap(default_value_t = PluginIosFramework::default())] pub(crate) ios_framework: PluginIosFramework, + /// Generate github workflows + #[clap(long)] + github_workflows: bool, /// Initializes a Tauri core plugin (internal usage) #[clap(long, hide(true))] @@ -58,6 +61,7 @@ impl From for super::init::Options { ios: o.ios, mobile: o.mobile, ios_framework: o.ios_framework, + github_workflows: o.github_workflows, tauri: o.tauri, tauri_path: o.tauri_path,