-
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (69 loc) · 2.08 KB
/
release-please.yml
File metadata and controls
83 lines (69 loc) · 2.08 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Test and Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
actions: read
checks: write
jobs:
lint:
if: "!contains(github.event.head_commit.message, 'chore(main)')"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '^1.23.0'
test:
if: "!contains(github.event.head_commit.message, 'chore(main)')"
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '^1.23.0' # The Go version to download (if necessary) and use.
- name: Install Tools and Protoc Plugins via Makefile
run: make init
- name: Run tests
run: make test
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '^1.23.0'
- name: Create Release and Changelog
id: release
uses: googleapis/release-please-action@v4
with:
config-file: release-please-config.json
manifest-file: .github/.release-please-manifest.json
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Tools and Protoc Plugins via Makefile
if: ${{ steps.release.outputs.release_created }}
run: make init
- name: Push to Buf Schema Registry
if: ${{ steps.release.outputs.release_created }}
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
run: |
buf push
buf push --label ${{ steps.release.outputs.tag_name }}
- name: Notify on new release
if: ${{ steps.release.outputs.release_created }}
run: |
echo "New release created: ${{ steps.release.outputs.tag_name }}"
echo "Release notes: ${{ steps.release.outputs.release_notes }}"