From cc4b021424cd5b772cee6de77d38001db4d8af85 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 21 Nov 2024 13:16:03 +0100 Subject: [PATCH 1/2] Using buf to produce protoc artifacts for release --- Taskfile.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index c375e5eb39d..095cae2dd87 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -258,10 +258,10 @@ tasks: protoc:collect: desc: Create a zip file containing all .proto files in DIST_DIR - dir: rpc cmds: - - mkdir --parents ../{{.DIST_DIR}} - - zip -r ../{{.DIST_DIR}}/{{.PROJECT_NAME}}_{{.VERSION}}_proto.zip * -i \*.proto + - mkdir --parents {{.DIST_DIR}} + - buf export . -o {{.DIST_DIR}}/proto + - cd {{.DIST_DIR}}/proto && zip -r ../{{.PROJECT_NAME}}_{{.VERSION}}_proto.zip . protoc:format: desc: Perform formatting of the protobuf definitions From 8e1e689d4eca2620266e0df1e8e9973af79c679e Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 21 Nov 2024 13:34:07 +0100 Subject: [PATCH 2/2] Updated gh workflows --- .github/workflows/check-protobuf-task.yml | 3 ++- .github/workflows/publish-go-nightly-task.yml | 5 +++++ .github/workflows/publish-go-tester-task.yml | 5 +++++ .github/workflows/release-go-task.yml | 5 +++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-protobuf-task.yml b/.github/workflows/check-protobuf-task.yml index f81a5da2a05..2953edf467a 100644 --- a/.github/workflows/check-protobuf-task.yml +++ b/.github/workflows/check-protobuf-task.yml @@ -53,7 +53,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v1 + - name: Install buf + uses: bufbuild/buf-action@v1 with: setup_only: true diff --git a/.github/workflows/publish-go-nightly-task.yml b/.github/workflows/publish-go-nightly-task.yml index ade13e6c2ef..46dd1089c13 100644 --- a/.github/workflows/publish-go-nightly-task.yml +++ b/.github/workflows/publish-go-nightly-task.yml @@ -265,6 +265,11 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 3.x + - name: Install buf + uses: bufbuild/buf-action@v1 + with: + setup_only: true + - name: Collect proto files env: NIGHTLY: true diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml index 6f26162096c..ccad7398fa0 100644 --- a/.github/workflows/publish-go-tester-task.yml +++ b/.github/workflows/publish-go-tester-task.yml @@ -127,6 +127,11 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 3.x + - name: Install buf + uses: bufbuild/buf-action@v1 + with: + setup_only: true + - name: Build run: | PACKAGE_NAME_PREFIX=${{ needs.package-name-prefix.outputs.prefix }} diff --git a/.github/workflows/release-go-task.yml b/.github/workflows/release-go-task.yml index d61142f066d..7c37deeacf8 100644 --- a/.github/workflows/release-go-task.yml +++ b/.github/workflows/release-go-task.yml @@ -265,6 +265,11 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 3.x + - name: Install buf + uses: bufbuild/buf-action@v1 + with: + setup_only: true + - name: Collect proto files run: task protoc:collect