Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GH action to publish proto files to BSR #753

Merged
merged 1 commit into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/proto-buf-publisher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Proto Buf Publishing - Action
# Protobuf runs buf (https://buf.build/) push updated proto files to https://buf.build/cosmwasm/wasmd
# This workflow is only run when a .proto file has been changed
on:
push:
branches:
- master
paths:
- 'proto/**'

jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: bufbuild/buf-setup-action@v0.7.0

# lint checks
- uses: bufbuild/buf-lint-action@v1
alpe marked this conversation as resolved.
Show resolved Hide resolved
with:
input: 'proto'

# backward compatibility breaking checks
- uses: bufbuild/buf-breaking-action@v1
with:
input: 'proto'
against: 'https://github.com/CosmWasm/wasmd.git#branch=master'
alpe marked this conversation as resolved.
Show resolved Hide resolved

# publish proto files
- uses: bufbuild/buf-push-action@v1
with:
input: 'proto'
buf_token: ${{ secrets.BUF_TOKEN }}
9 changes: 9 additions & 0 deletions buf.work.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated by "buf config migrate-v1beta1". Edit as necessary, and
# remove this comment when you're finished.
#
# This workspace file points to the roots found in your
# previous "buf.yaml" configuration.
version: v1
directories:
- proto
- third_party/proto
21 changes: 21 additions & 0 deletions proto/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by "buf config migrate-v1beta1". Edit as necessary, and
# remove this comment when you're finished.
#
# This module represents the "proto" root found in
# the previous configuration.
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
- COMMENTS
- FILE_LOWER_SNAKE_CASE
except:
- UNARY_RPC
- COMMENT_FIELD
- SERVICE_SUFFIX
- PACKAGE_VERSION_SUFFIX
- RPC_REQUEST_STANDARD_NAME
- PACKAGE_DIRECTORY_MATCH
39 changes: 20 additions & 19 deletions buf.yaml → third_party/proto/buf.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
version: v1beta1

# Generated by "buf config migrate-v1beta1". Edit as necessary, and
# remove this comment when you're finished.
#
# This module represents the "third_party/proto" root found in
# the previous configuration.
version: v1
build:
roots:
- proto
- third_party/proto
excludes:
- third_party/proto/google/protobuf
- google/protobuf
breaking:
use:
- FILE
ignore:
- confio
- cosmos
- cosmos_proto
- gogoproto
- google
- ibc
- tendermint
lint:
use:
- DEFAULT
Expand All @@ -19,21 +31,10 @@ lint:
- RPC_REQUEST_STANDARD_NAME
- PACKAGE_DIRECTORY_MATCH
ignore:
- confio
- cosmos
- ibc
- tendermint
- gogoproto
- cosmos_proto
- gogoproto
- google
- confio
breaking:
use:
- FILE
ignore:
- cosmos
- ibc
- tendermint
- gogoproto
- cosmos_proto
- google
- confio