-
Notifications
You must be signed in to change notification settings - Fork 14
36 lines (35 loc) · 1.18 KB
/
update-buf-version.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
name: Update bufbuild/buf Version
on:
workflow_dispatch:
inputs:
version:
type: string
description: The version you intend to release (e.g. x.y.z)
required: true
permissions:
contents: write
pull-requests: write
env:
RELEASE_BUF_VERSION: ${{ github.event.inputs.version }}
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Validate input version
if: ${{ startsWith(github.event.inputs.version, 'v') }}
run: |
echo "error: version must not start with 'v'."
exit 1
- name: Checkout repository code
uses: actions/checkout@v4
- name: Update Buf Version
run: make updatebufversion
- name: Create PR
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
with:
add-paths: .
commit-message: "Update bufbuild/buf version to ${{ env.RELEASE_BUF_VERSION }}"
branch: buf-${{ env.RELEASE_BUF_VERSION }}
delete-branch: true
title: "Update bufbuild/buf version to ${{ env.RELEASE_BUF_VERSION }}"
body: "Update bufbuild/buf version to newly released version, v${{ env.RELEASE_BUF_VERSION }}."