-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (40 loc) · 1.44 KB
/
release_please.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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