-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (39 loc) · 1.08 KB
/
bump-version.yml
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
name: bump-version
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: release-please
id: release
uses: GoogleCloudPlatform/release-please-action@v4
with:
token: ${{ secrets.TOKEN }}
release-type: go
- name: Get created PR number
id: pr-number
if: steps.release.outputs.pr
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const pr = ${{ steps.release.outputs.pr }};
return pr && pr.number
- name: Approve Release PR
if: steps.release.outputs.pr
run: gh pr review ${{ steps.pr-number.outputs.result }} --approve
env:
GH_TOKEN: ${{ github.token }}
- name: Merge Release PR
if: steps.release.outputs.pr
run: gh pr merge ${{ steps.pr-number.outputs.result }} --auto --rebase
env:
GH_TOKEN: ${{ secrets.TOKEN }}