Skip to content

Commit

Permalink
[Requires repository secret addition] Add Publish to Buf Github Action (
Browse files Browse the repository at this point in the history
#508)

_**READ BEFORE MERGING:** All PRs require approval by both Server AND
SDK teams before merging! This is why the number of required approvals
is "2" and not "1"--two reviewers from the same team is NOT sufficient.
If your PR is not approved by someone in BOTH teams, it may be summarily
reverted._

<!-- Describe what has changed in this PR -->
**What changed?**
Adds a GitHub Actions workflow to automate the process of pushing
protocol buffers to the Buf registry on every push to the main branch.

We need to set the `BUF_TOKEN` secret before merging this PR.

<!-- Tell your future self why have you made these changes -->
**Why?**
We want to be able to depend on server protos from other repositories
(e.g. api-cloud) using the buf package manager.


<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**
None.

<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**
NA
  • Loading branch information
nikki-dag authored Jan 9, 2025
1 parent e8fc1a5 commit 5e65ea6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/push-to-buf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push to Buf Registry

on:
push:
tags:
- 'v**'
branches:
- master
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: bufbuild/buf-action@v1
with:
version: 1.49.0
token: ${{ secrets.BUF_TEMPORALIO_TOKEN }}
1 change: 1 addition & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: v1
name: buf.build/temporalio/api
deps:
- buf.build/grpc-ecosystem/grpc-gateway
- buf.build/googleapis/googleapis
Expand Down

0 comments on commit 5e65ea6

Please sign in to comment.