Merge pull request #32 from k8sgpt-ai/feat/rework #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Release Please | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
release-please: | |
permissions: | |
contents: write # for google-github-actions/release-please-action to create release commit | |
pull-requests: write # for google-github-actions/release-please-action to create release PR | |
runs-on: ubuntu-latest | |
# Release-please creates a PR that tracks all changes | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
command: manifest | |
token: ${{secrets.GITHUB_TOKEN}} | |
default-branch: main | |
outputs: | |
releases_created: ${{ steps.release.outputs.releases_created }} | |
# these are generated by release-please b/c this is in a manifest repo. | |
buf_release_tag: ${{ steps.release.outputs.tag_name }} | |
push-module: | |
needs: release-please | |
name: push schema to buf registry | |
runs-on: ubuntu-latest | |
if: ${{ needs.release-please.outputs.releases_created && needs.release-please.outputs.buf_release_tag }} | |
steps: | |
# Run `git checkout` | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ needs.release-please.outputs.buf_release_tag }} | |
# Install the `buf` CLI | |
- uses: bufbuild/buf-setup-action@v1 | |
# Push module to the BSR | |
- name: bsr-push | |
run: BUF_TOKEN="${{ secrets.BUF_TOKEN }}" buf push --tag "${{ needs.release-please.outputs.buf_release_tag }}" protobuf |