From 05003c5dbf81398e29f2392a25409b53c45f32df Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 12 Sep 2025 13:01:40 +0300 Subject: [PATCH] Bump Go to 1.25 (#456) ## Motivation and Context The following PR: * Bumps Go to the latest stable version * Moves away from setting the Go version as an env var in favour of reading it automatically from the go.mod file (better consistency) Closes: #447 ## How Has This Been Tested? Locally ## Breaking Changes No ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [ ] My code follows the repository's style guidelines - [ ] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context --------- Signed-off-by: Radoslav Dimitrov --- .github/workflows/ci.yml | 7 ++----- .github/workflows/deploy.yml | 5 ++--- .github/workflows/release.yml | 2 +- Dockerfile | 2 +- go.mod | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a992fe..6e19ba9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,6 @@ on: pull_request: branches: [ main ] -env: - GO_VERSION: '1.24.x' - jobs: # Build, Lint, and Validate build-lint-validate: @@ -21,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' - name: Cache Go modules uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 #v4 @@ -65,7 +62,7 @@ jobs: - name: Set up Go uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' - name: Cache Go modules uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 #v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d6b7ab6..e0dd4fa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,6 @@ on: env: PULUMI_VERSION: "3.188.0" - GO_VERSION: "1.24.6" jobs: docker-push: @@ -66,7 +65,7 @@ jobs: - name: Setup Go uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' - name: Setup Pulumi uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e #v6 @@ -105,7 +104,7 @@ jobs: - name: Setup Go uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' - name: Setup Pulumi uses: pulumi/actions@cc7494be991dba0978f7ffafaf995b0449a0998e #v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bec436..7252a91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5 with: - go-version: '1.24.x' + go-version-file: 'go.mod' - name: Install cosign uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 #v3 diff --git a/Dockerfile b/Dockerfile index 36d2905..32caa73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.24-alpine AS builder +FROM golang:1.25-alpine AS builder WORKDIR /app # Copy go mod files first and download dependencies diff --git a/go.mod b/go.mod index 4e84b1c..1ff57ad 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/modelcontextprotocol/registry -go 1.24.0 +go 1.25 require ( github.com/caarlos0/env/v11 v11.3.1