Skip to content

Commit 15d48ae

Browse files
committed
Add CI/CD Actions
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
1 parent f047a2f commit 15d48ae

File tree

8 files changed

+183
-1
lines changed

8 files changed

+183
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a bug report to help us improve the project
4+
title: ''
5+
labels: 'type: bug, status: waiting-for-triage'
6+
assignees: ''
7+
8+
---
9+
10+
Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
11+
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
12+
13+
**Bug description**
14+
A clear and concise description of what the bug is about.
15+
16+
**Environment**
17+
Please provide as many details as possible: Spring MCP version, Java version, which vector store you use if any, etc
18+
19+
**Steps to reproduce**
20+
Steps to reproduce the issue.
21+
22+
**Expected behavior**
23+
A clear and concise description of what you expected to happen.
24+
25+
**Minimal Complete Reproducible example**
26+
Please provide a failing test or a minimal complete verifiable example that reproduces the issue.
27+
Bug reports that are reproducible will take priority in resolution over reports that are not reproducible.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions and Community Support
4+
url: https://stackoverflow.com/questions/tagged/spring-ai-mcp
5+
about: Please ask and answer questions on StackOverflow with the spring-ai tag
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'status: waiting-for-triage, type: feature'
6+
assignees: ''
7+
8+
---
9+
10+
Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.
11+
12+
**Expected Behavior**
13+
14+
<!--- Tell us how it should work. Add a code example to explain what you think the feature should look like. This is optional, but it would help up understand your expectations. -->
15+
16+
**Current Behavior**
17+
18+
<!--- Explain the difference from current behavior and why do you need this feature (aka why it is not possible to implement the desired functionality with the current version) -->
19+
20+
**Context**
21+
22+
<!---
23+
How has this issue affected you?
24+
What are you trying to accomplish?
25+
What other alternatives have you considered?
26+
Are you aware of any workarounds?
27+
-->
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Miscellaneous
3+
about: Suggest an improvement for this project
4+
title: ''
5+
labels: 'status: waiting-for-triage'
6+
assignees: ''
7+
8+
---
9+
10+
For anything other than bug reports and feature requests (performance, refactoring, etc),
11+
just go ahead and file the issue. Please provide as many details as possible.
12+
13+
If you have a question or a support request, please open a new discussion on [GitHub Discussions](https://github.com/modelcontextprotocol/java-sdk/discussions)
14+
15+
Please do **not** create issues on the [Issue Tracker](https://github.com/modelcontextprotocol/java-sdk/issues) for questions or support requests.
16+
We would like to keep the issue tracker **exclusively** for bug reports and feature requests.

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
pull_request: {}
5+
6+
jobs:
7+
build:
8+
name: Build branch
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout source code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: '17'
18+
distribution: 'temurin'
19+
cache: 'maven'
20+
21+
- name: Build
22+
run: mvn verify
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release to Maven Central
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Set up Java
13+
uses: actions/setup-java@v4
14+
with:
15+
java-version: '17'
16+
distribution: 'temurin'
17+
cache: 'maven'
18+
server-id: central
19+
server-username: MAVEN_USERNAME
20+
server-password: MAVEN_PASSWORD
21+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
22+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
29+
- name: Build and Test
30+
run: mvn clean verify
31+
32+
- name: Publish to Maven Central
33+
run: |
34+
mvn --batch-mode \
35+
-Prelease \
36+
-Pjavadoc \
37+
deploy
38+
env:
39+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
40+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
41+
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish Snapshot
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
name: Build branch
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout source code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 17
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '17'
19+
distribution: 'temurin'
20+
cache: 'maven'
21+
server-id: central
22+
server-username: MAVEN_USERNAME
23+
server-password: MAVEN_PASSWORD
24+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
25+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
32+
- name: Generate Java docs
33+
run: mvn -Pjavadoc -B javadoc:aggregate
34+
35+
- name: Build with Maven and deploy to Sonatype snapshot repository
36+
env:
37+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
38+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
39+
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
40+
run: |
41+
mvn -Pjavadoc -Prelease --batch-mode --update-snapshots deploy
42+
43+
- name: Capture project version
44+
run: echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
<extensions>true</extensions>
295295
<configuration>
296296
<publishingServerId>central</publishingServerId>
297-
<autoPublish>true</autoPublish>
297+
<!-- <autoPublish>true</autoPublish> -->
298298
</configuration>
299299
</plugin>
300300
<plugin>

0 commit comments

Comments
 (0)