From 0c485d9e70f9d72541dc4eb0faabdb0c5b918381 Mon Sep 17 00:00:00 2001 From: Gus Cairo Date: Tue, 2 Apr 2024 15:55:38 +0100 Subject: [PATCH 1/3] Update GitHub release workflow --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b3eb987a..a51db7b03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,9 @@ jobs: run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Build the plugins - run: make plugins + run: | + swift build --build-path=./.build --configuration=release --product protoc-gen-swift + swift build --build-path=./.build --configuration=release --product protoc-gen-grpc-swift - name: Zip the plugins run: | From 7fb1054c50662f06383ca14d775a89788f851d15 Mon Sep 17 00:00:00 2001 From: Gus Cairo Date: Tue, 2 Apr 2024 15:58:15 +0100 Subject: [PATCH 2/3] Update docs to remove references to `make plugins` --- Sources/GRPC/Docs.docc/index.md | 10 ++++++++-- docs/plugin.md | 9 +-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Sources/GRPC/Docs.docc/index.md b/Sources/GRPC/Docs.docc/index.md index 02ed91538..e9657a9c1 100644 --- a/Sources/GRPC/Docs.docc/index.md +++ b/Sources/GRPC/Docs.docc/index.md @@ -63,8 +63,14 @@ dependencies: [ Binary releases of `protoc`, the Protocol Buffer Compiler, are available on [GitHub][protobuf-releases]. -To build the plugins, run `make plugins` in the main directory. This uses the -Swift Package Manager to build both of the necessary plugins: +To build the plugins, run the following in the main directory: + +```sh +$ swift build --product protoc-gen-swift +$ swift build --product protoc-gen-grpc-swift +``` + +This uses the Swift Package Manager to build both of the necessary plugins: `protoc-gen-swift`, which generates Protocol Buffer support code and `protoc-gen-grpc-swift`, which generates gRPC interface code. diff --git a/docs/plugin.md b/docs/plugin.md index d09800c89..0d3cbcb89 100644 --- a/docs/plugin.md +++ b/docs/plugin.md @@ -5,14 +5,7 @@ compiler `protoc` to generate classes for clients and services. ## Building the Plugin -The `protoc-gen-grpc-swift` plugin can be built by using the Makefile in the -top-level directory: - -```sh -$ make plugins -``` - -The Swift Package Manager may also be invoked directly to build the plugin: +The `protoc-gen-grpc-swift` plugin can be built using the Swift Package Manager: ```sh $ swift build --product protoc-gen-grpc-swift From 8725ee88662c4a843140f766fb1c31c3e3ba3bcd Mon Sep 17 00:00:00 2001 From: Gus Cairo Date: Tue, 2 Apr 2024 16:29:19 +0100 Subject: [PATCH 3/3] Copy build artefacts into current dir --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a51db7b03..32b23c35a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,8 +16,10 @@ jobs: - name: Build the plugins run: | - swift build --build-path=./.build --configuration=release --product protoc-gen-swift - swift build --build-path=./.build --configuration=release --product protoc-gen-grpc-swift + swift build --configuration=release --product protoc-gen-swift + cp ./.build/release/protoc-gen-swift . + swift build --configuration=release --product protoc-gen-grpc-swift + cp ./.build/release/protoc-gen-grpc-swift . - name: Zip the plugins run: |