From 975f631b384cf7fce24027748edcf1517688707c Mon Sep 17 00:00:00 2001 From: Benjamin DENEUX Date: Fri, 30 Jun 2023 15:14:44 +0200 Subject: [PATCH] ci(buf): publish draft buf --- .github/workflows/build.yml | 16 ++++++++++++++++ .github/workflows/publish.yml | 9 +++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c38490c8..7c14619ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,3 +60,19 @@ jobs: if: steps.changed-proto-files.outputs.any_changed == 'true' run: | make proto-gen + + publish-buf-proto: + runs-on: ubuntu-20.04 + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Setup buf + uses: bufbuild/buf-setup-action@v1.14.0 + + - name: Push okp4 proto on buf registry + run: + buf push proto --draft ${{ github.ref_name }} + + env: + BUF_TOKEN: ${{ secrets.BUF_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6232119a2..5d4bdd7dc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -89,7 +89,8 @@ jobs: uses: bufbuild/buf-setup-action@v1.14.0 - name: Push okp4 proto on buf registry - uses: bufbuild/buf-push-action@v1 - with: - input: 'proto' - buf_token: ${{ secrets.BUF_TOKEN }} + run: + buf push proto --tag ${{ github.sha }} + + env: + BUF_TOKEN: ${{ secrets.BUF_TOKEN }}