Skip to content

Commit 191f20b

Browse files
committed
add gh actions
1 parent e915ccb commit 191f20b

File tree

19 files changed

+735
-69
lines changed

19 files changed

+735
-69
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to report a bug! Please fill out this form as completely as possible.
11+
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: Bug Description
16+
description: A clear and concise description of what the bug is.
17+
placeholder: Describe the bug...
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: steps
23+
attributes:
24+
label: Steps to Reproduce
25+
description: Steps to reproduce the behavior
26+
placeholder: |
27+
1. Generate code with '...'
28+
2. Run command '...'
29+
3. See error
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: expected
35+
attributes:
36+
label: Expected Behavior
37+
description: A clear and concise description of what you expected to happen.
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: actual
43+
attributes:
44+
label: Actual Behavior
45+
description: What actually happened instead.
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
id: environment
51+
attributes:
52+
label: Environment
53+
description: |
54+
Please provide information about your environment:
55+
value: |
56+
- OS:
57+
- Go version:
58+
- protoc-gen-go-mcp version:
59+
- buf version:
60+
validations:
61+
required: true
62+
63+
- type: textarea
64+
id: proto
65+
attributes:
66+
label: Proto Files
67+
description: If applicable, provide the relevant .proto files
68+
render: protobuf
69+
70+
- type: textarea
71+
id: config
72+
attributes:
73+
label: Configuration
74+
description: If applicable, provide your buf.gen.yaml or relevant configuration
75+
render: yaml
76+
77+
- type: textarea
78+
id: logs
79+
attributes:
80+
label: Error Output/Logs
81+
description: If applicable, add error messages or log output
82+
render: shell
83+
84+
- type: textarea
85+
id: additional
86+
attributes:
87+
label: Additional Context
88+
description: Add any other context about the problem here.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for suggesting a new feature! Please fill out this form to help us understand your request.
11+
12+
- type: textarea
13+
id: summary
14+
attributes:
15+
label: Feature Summary
16+
description: A brief summary of the feature you'd like to see
17+
placeholder: Briefly describe the feature...
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: motivation
23+
attributes:
24+
label: Motivation
25+
description: Why would this feature be useful? What problem does it solve?
26+
placeholder: Explain the motivation for this feature...
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: solution
32+
attributes:
33+
label: Proposed Solution
34+
description: How would you like this feature to work?
35+
placeholder: Describe your proposed solution...
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: alternatives
41+
attributes:
42+
label: Alternatives Considered
43+
description: What alternative solutions or features have you considered?
44+
placeholder: Describe any alternatives you've considered...
45+
46+
- type: textarea
47+
id: examples
48+
attributes:
49+
label: Examples
50+
description: Provide examples of how this feature would be used
51+
placeholder: |
52+
Example usage:
53+
```go
54+
// Your example here
55+
```
56+
57+
- type: checkboxes
58+
id: breaking
59+
attributes:
60+
label: Breaking Change
61+
description: Would this feature require breaking changes?
62+
options:
63+
- label: This feature would require breaking changes
64+
- label: This feature can be implemented without breaking changes
65+
- label: I'm not sure about breaking changes
66+
67+
- type: textarea
68+
id: additional
69+
attributes:
70+
label: Additional Context
71+
description: Add any other context, screenshots, or examples about the feature request here.

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
updates:
3+
# Go modules
4+
- package-ecosystem: "gomod"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 10
9+
reviewers:
10+
- "redpanda-data/protoc-gen-go-mcp-maintainers"
11+
12+
# Go modules for examples
13+
- package-ecosystem: "gomod"
14+
directory: "/examples/basic"
15+
schedule:
16+
interval: "weekly"
17+
open-pull-requests-limit: 5
18+
19+
- package-ecosystem: "gomod"
20+
directory: "/examples/openai-compat"
21+
schedule:
22+
interval: "weekly"
23+
open-pull-requests-limit: 5
24+
25+
# GitHub Actions
26+
- package-ecosystem: "github-actions"
27+
directory: "/"
28+
schedule:
29+
interval: "weekly"
30+
open-pull-requests-limit: 5

.github/pull_request_template.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Description
2+
3+
Brief description of what this PR does.
4+
5+
## Type of change
6+
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
- [ ] Refactoring (no functional changes)
12+
- [ ] Performance improvement
13+
14+
## Testing
15+
16+
- [ ] Unit tests pass (`go test ./...`)
17+
- [ ] Examples build successfully (`make examples`)
18+
- [ ] Golden files are up to date (`make update-golden` if needed)
19+
- [ ] Manual testing performed (describe if applicable)
20+
21+
## Checklist
22+
23+
- [ ] Code follows the project's style guidelines
24+
- [ ] Self-review of code completed
25+
- [ ] Comments added for complex logic
26+
- [ ] Documentation updated if needed
27+
- [ ] No new linter warnings introduced
28+
29+
## Additional Notes
30+
31+
Any additional information or context about this PR.

.github/workflows/release.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
include:
17+
- goos: linux
18+
goarch: amd64
19+
suffix: ''
20+
- goos: linux
21+
goarch: arm64
22+
suffix: ''
23+
- goos: darwin
24+
goarch: amd64
25+
suffix: ''
26+
- goos: darwin
27+
goarch: arm64
28+
suffix: ''
29+
- goos: windows
30+
goarch: amd64
31+
suffix: '.exe'
32+
- goos: windows
33+
goarch: arm64
34+
suffix: '.exe'
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Set up Go
40+
uses: actions/setup-go@v5
41+
with:
42+
go-version: '1.23'
43+
44+
- name: Build binary
45+
env:
46+
GOOS: ${{ matrix.goos }}
47+
GOARCH: ${{ matrix.goarch }}
48+
run: |
49+
output="protoc-gen-go-mcp-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }}"
50+
go build -ldflags="-s -w" -o "$output" ./cmd/protoc-gen-go-mcp
51+
52+
# Create archive
53+
if [ "${{ matrix.goos }}" = "windows" ]; then
54+
zip "${output%.exe}.zip" "$output"
55+
else
56+
tar czf "${output}.tar.gz" "$output"
57+
fi
58+
59+
- name: Upload artifacts
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: protoc-gen-go-mcp-${{ matrix.goos }}-${{ matrix.goarch }}
63+
path: |
64+
protoc-gen-go-mcp-*
65+
!protoc-gen-go-mcp-*.tar.gz
66+
!protoc-gen-go-mcp-*.zip
67+
68+
release:
69+
needs: build
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- name: Download all artifacts
75+
uses: actions/download-artifact@v4
76+
77+
- name: Create checksums
78+
run: |
79+
find . -name "protoc-gen-go-mcp-*" -type f -exec sha256sum {} \; > checksums.txt
80+
81+
- name: Create Release
82+
uses: softprops/action-gh-release@v2
83+
with:
84+
files: |
85+
protoc-gen-go-mcp-*/protoc-gen-go-mcp-*
86+
checksums.txt
87+
generate_release_notes: true
88+
draft: false
89+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}

0 commit comments

Comments
 (0)