Add GH action to publish proto files to BSR (#753)

GH Action includes:
- check for lint errors
- check for backward compatibility breaking changes

Migrated buf config files from v1beta1 to v1 using command:
'buf config migrate-v1beta1'
(https://docs.buf.build/configuration/v1beta1-migration-guide)
This commit is contained in:
pinosu
2022-02-12 14:25:36 +01:00
committed by GitHub
parent 08b00b97f1
commit a6cb4c026f
4 changed files with 85 additions and 21 deletions

View File

@@ -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
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'
# publish proto files
- uses: bufbuild/buf-push-action@v1
with:
input: 'proto'
buf_token: ${{ secrets.BUF_TOKEN }}