@@ -608,6 +608,7 @@ private function get_output_path( $assoc_args, $subdir ) {
608
608
* options:
609
609
* - circle
610
610
* - gitlab
611
+ * - github
611
612
* ---
612
613
*
613
614
* [--activate]
@@ -733,6 +734,7 @@ public function plugin( $args, $assoc_args ) {
733
734
* - circle
734
735
* - gitlab
735
736
* - bitbucket
737
+ * - github
736
738
* ---
737
739
*
738
740
* [--force]
@@ -785,6 +787,7 @@ public function plugin_tests( $args, $assoc_args ) {
785
787
* - circle
786
788
* - gitlab
787
789
* - bitbucket
790
+ * - github
788
791
* ---
789
792
*
790
793
* [--force]
@@ -882,6 +885,8 @@ private function scaffold_plugin_theme_tests( $args, $assoc_args, $type ) {
882
885
$ files_to_create [ "{$ target_dir }/.gitlab-ci.yml " ] = self ::mustache_render ( 'plugin-gitlab.mustache ' );
883
886
} elseif ( 'bitbucket ' === $ assoc_args ['ci ' ] ) {
884
887
$ 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 ' );
885
890
}
886
891
887
892
$ files_written = $ this ->create_files ( $ files_to_create , $ force );
@@ -949,6 +954,12 @@ protected function create_files( $files_and_contents, $force ) {
949
954
950
955
$ wp_filesystem ->mkdir ( dirname ( $ filename ) );
951
956
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
+
952
963
if ( ! $ wp_filesystem ->put_contents ( $ filename , $ contents ) ) {
953
964
WP_CLI ::error ( "Error creating file: {$ filename }" );
954
965
} elseif ( $ should_write_file ) {
0 commit comments