Skip to content

chore(buf): use new buf gh action #2

chore(buf): use new buf gh action

chore(buf): use new buf gh action #2

Workflow file for this run

name: buf
on:
push:
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
java:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- uses: bufbuild/buf-action@v1
with:
setup_only: true
github_token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.BUF_TOKEN }}
- name: generate
run: make generate
- name: test
working-directory: java
run: ./gradlew clean build
- name: publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
working-directory: java
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_TAG=${GITHUB_REF/refs\/tags\/v/}
echo $RELEASE_TAG
./gradlew -Pversion=$RELEASE_TAG clean publish
buf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v1
with:
token: ${{ secrets.BUF_TOKEN }}
setup_only: false
github_token: ${{ secrets.GITHUB_TOKEN }}
breaking_against: "https://github.com/stroeer/tapir.git#branch=main"