@@ -608,6 +608,7 @@ private function get_output_path( $assoc_args, $subdir ) {
608608 * options:
609609 * - circle
610610 * - gitlab
611+ * - github
611612 * ---
612613 *
613614 * [--activate]
@@ -733,6 +734,7 @@ public function plugin( $args, $assoc_args ) {
733734 * - circle
734735 * - gitlab
735736 * - bitbucket
737+ * - github
736738 * ---
737739 *
738740 * [--force]
@@ -785,6 +787,7 @@ public function plugin_tests( $args, $assoc_args ) {
785787 * - circle
786788 * - gitlab
787789 * - bitbucket
790+ * - github
788791 * ---
789792 *
790793 * [--force]
@@ -882,6 +885,8 @@ private function scaffold_plugin_theme_tests( $args, $assoc_args, $type ) {
882885 $ files_to_create [ "{$ target_dir }/.gitlab-ci.yml " ] = self ::mustache_render ( 'plugin-gitlab.mustache ' );
883886 } elseif ( 'bitbucket ' === $ assoc_args ['ci ' ] ) {
884887 $ files_to_create [ "{$ target_dir }/bitbucket-pipelines.yml " ] = self ::mustache_render ( 'plugin-bitbucket.mustache ' );
888+ } elseif ( 'github ' === $ assoc_args ['ci ' ] ) {
889+ $ files_to_create [ "{$ target_dir }/.github/workflows/testing.yml " ] = self ::mustache_render ( 'plugin-github.mustache ' );
885890 }
886891
887892 $ files_written = $ this ->create_files ( $ files_to_create , $ force );
@@ -949,6 +954,12 @@ protected function create_files( $files_and_contents, $force ) {
949954
950955 $ wp_filesystem ->mkdir ( dirname ( $ filename ) );
951956
957+ // Create multi-level folders.
958+ if ( false === $ wp_filesystem ->exists ( dirname ( $ filename ) ) ) {
959+ $ wp_filesystem ->mkdir ( dirname ( dirname ( $ filename ) ) );
960+ $ wp_filesystem ->mkdir ( dirname ( $ filename ) );
961+ }
962+
952963 if ( ! $ wp_filesystem ->put_contents ( $ filename , $ contents ) ) {
953964 WP_CLI ::error ( "Error creating file: {$ filename }" );
954965 } elseif ( $ should_write_file ) {
0 commit comments