diff --git a/.github/workflows/php-ext.yml b/.github/workflows/php-ext.yml index f24f6bf62b..74cd69cced 100644 --- a/.github/workflows/php-ext.yml +++ b/.github/workflows/php-ext.yml @@ -28,6 +28,10 @@ jobs: rm -rf "$GITHUB_WORKSPACE/php/ext/google/protobuf/third_party" cp -r "$GITHUB_WORKSPACE/third_party" "$GITHUB_WORKSPACE/php/ext/google/protobuf" cp "$GITHUB_WORKSPACE/LICENSE" "$GITHUB_WORKSPACE/php/ext/google/protobuf" + - name: Generate package.xml + run: | + bazel build $GITHUB_WORKSPACE/php/ext/google/protobuf:generate_package_xml + cp $GITHUB_WORKSPACE/bazel-bin/php/ext/google/protobuf/package.xml $GITHUB_WORKSPACE/php/ext/google/protobuf/package.xml - name: Create package run: | cd /tmp diff --git a/php/BUILD.bazel b/php/BUILD.bazel index ac33702ab7..948541cb00 100644 --- a/php/BUILD.bazel +++ b/php/BUILD.bazel @@ -14,15 +14,11 @@ filegroup( "//php:__pkg__", ], srcs = glob([ - "ext/google/protobuf/*.h", - "ext/google/protobuf/*.c", "src/GPBMetadata/Google/Protobuf/**/*.php", "src/Google/Protobuf/**/*.php", ]) + [ "composer.json", - "ext/google/protobuf/wkt.inc", - "ext/google/protobuf/config.m4", - "ext/google/protobuf/package.xml", + "//php/ext/google/protobuf:source_files", ], ) diff --git a/php/ext/google/protobuf/BUILD.bazel b/php/ext/google/protobuf/BUILD.bazel index 59180678f9..ca37abce22 100644 --- a/php/ext/google/protobuf/BUILD.bazel +++ b/php/ext/google/protobuf/BUILD.bazel @@ -17,12 +17,12 @@ pkg_files( ) pkg_files( - name = "protobuf_files", + name = "source_files", srcs = glob([ "*.h", "*.c", ]) + [ - "//:LICENSE", + "LICENSE", "config.m4", "wkt.inc", ], @@ -31,7 +31,7 @@ pkg_files( pkg_filegroup( name = "release_files", srcs = [ - ":protobuf_files", + ":source_files", ":utf8_range_files", ], )