Skip to content

Commit

Permalink
chore(ci): add support for pushing proto definitions to Buf Schema Re…
Browse files Browse the repository at this point in the history
…gistry (#113)

since we have the blob definition in this repo, it would be good for it
to be pushed to BSR to be used by downstream repos.
  • Loading branch information
rach-id authored Oct 17, 2024
1 parent f47b641 commit f0bf090
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 6 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/buf-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: buf-ci
on:
push:
branches:
- main
- "v[0-9]+.x"
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
buf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-breaking-action@v1
with:
against: 'https://github.com/celestiaorg/go-square.git#branch=main'
- uses: bufbuild/buf-lint-action@v1
23 changes: 23 additions & 0 deletions .github/workflows/buf-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: buf-release
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: "1.44.0"
# Push the protobuf definitions to the BSR
- uses: bufbuild/buf-push-action@v1
with:
buf_token: ${{ secrets.BUF_TOKEN }}
- name: "push the tag label to BSR"
run: |
set -euo pipefail
echo ${{ secrets.BUF_TOKEN }} | buf registry login --token-stdin
buf push --label ${{ github.ref_name }}
5 changes: 3 additions & 2 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version: v1
name: buf.build/celestiaorg/go-square
version: v2
modules:
- name: buf.build/celestia/go-square
breaking:
use:
- FILE
Expand Down
8 changes: 4 additions & 4 deletions proto/blob/v1/blob.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ message BlobProto {
uint32 share_version = 3;
uint32 namespace_version = 4;
// Signer is sdk.AccAddress that paid for this blob. This field is optional
// and can only be used when share_version is set to 1.
// and can only be used when share_version is set to 1.
bytes signer = 5;
}

Expand All @@ -29,7 +29,7 @@ message BlobTx {
// IndexWrapper adds index metadata to a transaction. This is used to track
// transactions that pay for blobs, and where the blobs start in the square.
message IndexWrapper {
bytes tx = 1;
bytes tx = 1;
repeated uint32 share_indexes = 2;
string type_id = 3;
}
string type_id = 3;
}

0 comments on commit f0bf090

Please sign in to comment.