Skip to content

Commit 4bfa5ef

Browse files
committed
ci: GitHub release and better version management (#1-#6)
ci: Add gh release button (#1) ci: No tests (#2) ci: Add dependencyManagement (#3) add liquid version (#4) minor ci fix: Minor ci, ignore keys (#6) * minor ci, ignore keys * try docker + default revision
1 parent fa9dac8 commit 4bfa5ef

13 files changed

Lines changed: 69 additions & 97 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ jobs:
1818
distribution: 'temurin'
1919
cache: 'maven'
2020

21+
- name: Verify Docker
22+
run: docker info
23+
2124
- name: Build
2225
run: mvn verify
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
name: Release to Maven Central
1+
name: Publish package to GitHub Packages
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version'
8+
required: true
9+
type: string
10+
workflow_call:
11+
inputs:
12+
version:
13+
description: 'Version'
14+
required: true
15+
type: string
16+
env:
17+
RELEASE_VERSION: ${{ inputs.version }}
518

619
jobs:
720
publish:
821
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
packages: write
925
steps:
1026
- uses: actions/checkout@v4
11-
12-
- name: Set up Java
27+
- name: Set up Java for publishing to GitHub Packages
1328
uses: actions/setup-java@v4
1429
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
30+
java-version: 17
31+
distribution: corretto
32+
# - name: Setup Node.js
33+
# uses: actions/setup-node@v4
34+
# with:
35+
# node-version: '20'
36+
# - name: Build and Test
37+
# run: mvn clean verify
38+
- name: Publish to GitHub Packages
39+
run: mvn -X -Drevision=${RELEASE_VERSION} -DskipTests --batch-mode deploy
3840
env:
39-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
40-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
41-
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish-snapshot.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

mcp-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>io.modelcontextprotocol.sdk</groupId>
99
<artifactId>mcp-parent</artifactId>
10-
<version>0.18.0-SNAPSHOT</version>
10+
<version>${revision}</version>
1111
</parent>
1212

1313
<artifactId>mcp-bom</artifactId>

mcp-core/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.modelcontextprotocol.sdk</groupId>
88
<artifactId>mcp-parent</artifactId>
9-
<version>0.18.0-SNAPSHOT</version>
9+
<version>${revision}</version>
1010
</parent>
1111
<artifactId>mcp-core</artifactId>
1212
<packaging>jar</packaging>
@@ -68,7 +68,7 @@
6868
<dependency>
6969
<groupId>io.modelcontextprotocol.sdk</groupId>
7070
<artifactId>mcp-json</artifactId>
71-
<version>0.18.0-SNAPSHOT</version>
71+
<version>${project.parent.version}</version>
7272
</dependency>
7373

7474
<dependency>
@@ -101,7 +101,7 @@
101101
<dependency>
102102
<groupId>io.modelcontextprotocol.sdk</groupId>
103103
<artifactId>mcp-json-jackson2</artifactId>
104-
<version>0.18.0-SNAPSHOT</version>
104+
<version>${project.parent.version}</version>
105105
<scope>test</scope>
106106
</dependency>
107107

mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,15 @@ public record ServerCapabilities( // @formatter:off
490490
* Present if the server supports argument autocompletion suggestions.
491491
*/
492492
@JsonInclude(JsonInclude.Include.NON_ABSENT)
493+
@JsonIgnoreProperties(ignoreUnknown = true)
493494
public record CompletionCapabilities() {
494495
}
495496

496497
/**
497498
* Present if the server supports sending log messages to the client.
498499
*/
499500
@JsonInclude(JsonInclude.Include.NON_ABSENT)
501+
@JsonIgnoreProperties(ignoreUnknown = true)
500502
public record LoggingCapabilities() {
501503
}
502504

@@ -507,6 +509,7 @@ public record LoggingCapabilities() {
507509
* the prompt list
508510
*/
509511
@JsonInclude(JsonInclude.Include.NON_ABSENT)
512+
@JsonIgnoreProperties(ignoreUnknown = true)
510513
public record PromptCapabilities(@JsonProperty("listChanged") Boolean listChanged) {
511514
}
512515

@@ -518,6 +521,7 @@ public record PromptCapabilities(@JsonProperty("listChanged") Boolean listChange
518521
* the resource list
519522
*/
520523
@JsonInclude(JsonInclude.Include.NON_ABSENT)
524+
@JsonIgnoreProperties(ignoreUnknown = true)
521525
public record ResourceCapabilities(@JsonProperty("subscribe") Boolean subscribe,
522526
@JsonProperty("listChanged") Boolean listChanged) {
523527
}
@@ -529,6 +533,7 @@ public record ResourceCapabilities(@JsonProperty("subscribe") Boolean subscribe,
529533
* the tool list
530534
*/
531535
@JsonInclude(JsonInclude.Include.NON_ABSENT)
536+
@JsonIgnoreProperties(ignoreUnknown = true)
532537
public record ToolCapabilities(@JsonProperty("listChanged") Boolean listChanged) {
533538
}
534539

mcp-json-jackson2/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.modelcontextprotocol.sdk</groupId>
88
<artifactId>mcp-parent</artifactId>
9-
<version>0.18.0-SNAPSHOT</version>
9+
<version>${revision}</version>
1010
</parent>
1111
<artifactId>mcp-json-jackson2</artifactId>
1212
<packaging>jar</packaging>
@@ -37,7 +37,7 @@
3737
<dependency>
3838
<groupId>io.modelcontextprotocol.sdk</groupId>
3939
<artifactId>mcp-json</artifactId>
40-
<version>0.18.0-SNAPSHOT</version>
40+
<version>${project.parent.version}</version>
4141
</dependency>
4242
<dependency>
4343
<groupId>com.fasterxml.jackson.core</groupId>

mcp-json/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.modelcontextprotocol.sdk</groupId>
88
<artifactId>mcp-parent</artifactId>
9-
<version>0.18.0-SNAPSHOT</version>
9+
<version>${revision}</version>
1010
</parent>
1111
<artifactId>mcp-json</artifactId>
1212
<packaging>jar</packaging>

mcp-spring/mcp-spring-webflux/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.modelcontextprotocol.sdk</groupId>
88
<artifactId>mcp-parent</artifactId>
9-
<version>0.18.0-SNAPSHOT</version>
9+
<version>${revision}</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212
<artifactId>mcp-spring-webflux</artifactId>
@@ -25,19 +25,19 @@
2525
<dependency>
2626
<groupId>io.modelcontextprotocol.sdk</groupId>
2727
<artifactId>mcp-json-jackson2</artifactId>
28-
<version>0.18.0-SNAPSHOT</version>
28+
<version>${project.version}</version>
2929
</dependency>
3030

3131
<dependency>
3232
<groupId>io.modelcontextprotocol.sdk</groupId>
3333
<artifactId>mcp</artifactId>
34-
<version>0.18.0-SNAPSHOT</version>
34+
<version>${project.version}</version>
3535
</dependency>
3636

3737
<dependency>
3838
<groupId>io.modelcontextprotocol.sdk</groupId>
3939
<artifactId>mcp-test</artifactId>
40-
<version>0.18.0-SNAPSHOT</version>
40+
<version>${project.version}</version>
4141
<scope>test</scope>
4242
</dependency>
4343

mcp-spring/mcp-spring-webmvc/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.modelcontextprotocol.sdk</groupId>
88
<artifactId>mcp-parent</artifactId>
9-
<version>0.18.0-SNAPSHOT</version>
9+
<version>${revision}</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212
<artifactId>mcp-spring-webmvc</artifactId>
@@ -25,13 +25,13 @@
2525
<dependency>
2626
<groupId>io.modelcontextprotocol.sdk</groupId>
2727
<artifactId>mcp-json-jackson2</artifactId>
28-
<version>0.18.0-SNAPSHOT</version>
28+
<version>${project.parent.version}</version>
2929
</dependency>
3030

31-
<dependency>
31+
<dependency>
3232
<groupId>io.modelcontextprotocol.sdk</groupId>
3333
<artifactId>mcp</artifactId>
34-
<version>0.18.0-SNAPSHOT</version>
34+
<version>${project.parent.version}</version>
3535
</dependency>
3636

3737
<dependency>
@@ -43,14 +43,14 @@
4343
<dependency>
4444
<groupId>io.modelcontextprotocol.sdk</groupId>
4545
<artifactId>mcp-test</artifactId>
46-
<version>0.18.0-SNAPSHOT</version>
46+
<version>${project.parent.version}</version>
4747
<scope>test</scope>
4848
</dependency>
4949

50-
<dependency>
50+
<dependency>
5151
<groupId>io.modelcontextprotocol.sdk</groupId>
5252
<artifactId>mcp-spring-webflux</artifactId>
53-
<version>0.18.0-SNAPSHOT</version>
53+
<version>${project.parent.version}</version>
5454
<scope>test</scope>
5555
</dependency>
5656

0 commit comments

Comments
 (0)