Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
Comment thread
anubhav756 marked this conversation as resolved.
Outdated
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: release-please-manifest.json
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ Commits](https://www.conventionalcommits.org/) for structuring commit messages.
cd mcp-toolbox-sdk-java
```

3. Maven clean install:
3. Build the project:
```bash
mvn clean install
```
This would directly generate the package JAR in the local (Developement env's) .m2 directory.

But if you want to generate it in a specific directory:

4. Create a directory to store the JAR:
This will generate the package JAR in your local `.m2` repository, making it available for other local Maven projects.

4. (Optional) Run deploy to a local directory for verification:
```bash
mkdir -p gcs-repo
mvn deploy -DaltDeploymentRepository=local::default::file://$(pwd)/target/staging-deploy
```

5. Run deploy using $(pwd) to get the full path:
```bash
mvn deploy -DaltDeploymentRepository=gcs-repo::default::file://$(pwd)/gcs-repo
```
This tells Maven to deploy to a local folder named `gcs-repo` in the correct directory structure.
## Release Process

This repository uses [Release Please](https://github.com/googleapis/release-please) to automate the release process.

1. **Pull Requests**: When code is merged into the `main` branch, Release Please analyzes the commit messages (which must follow [Conventional Commits](https://www.conventionalcommits.org/)).
2. **Release PR**: Release Please creates or updates a special "Release PR" that updates the `CHANGELOG.md` and bumps the version in `pom.xml`.
3. **Release Creation**: When a maintainer approves and merges the Release PR, Release Please tags the commit, creates a GitHub Release, and triggers the publishing workflow (to Maven Central).

Use this package in your test application.

Expand Down
23 changes: 8 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
limitations under the License.
-->

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>sdk-platform-java-config</artifactId>
<version>3.55.1</version>
</parent>

<groupId>com.google.cloud.mcp</groupId>
<artifactId>mcp-toolbox-sdk-java</artifactId>
Expand All @@ -29,7 +29,9 @@
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson.version>2.15.2</jackson.version>
<google.auth.version>1.23.0</google.auth.version>
</properties>
<jackson.version>2.15.2</jackson.version>
<google.auth.version>1.23.0</google.auth.version>
</properties>
Expand Down Expand Up @@ -64,13 +66,4 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"packages": {
".": {
"release-type": "java",
"package-name": "mcp-toolbox-sdk-java"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
3 changes: 3 additions & 0 deletions release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
Loading