diff --git a/magefiles/magefile.go b/magefiles/magefile.go
index e31d9cd..2f4a3ba 100644
--- a/magefiles/magefile.go
+++ b/magefiles/magefile.go
@@ -6,4 +6,5 @@ const (
 	GO_DIR     = "go"
 
 	TS_CODEGEN_VERSION = "1.11.1"
+	GO_CODEGEN_VERSION = "0.2.5"
 )
diff --git a/magefiles/utils.go b/magefiles/utils.go
index e32d985..018f7a1 100644
--- a/magefiles/utils.go
+++ b/magefiles/utils.go
@@ -139,7 +139,7 @@ func ensureGoCodegen() {
 	}
 
 	fmt.Printf("🔨 Installing go-codegen...\n")
-	if err := sh.Run("go", "install", "github.com/srdtrk/go-codegen@v0.2.5"); err != nil {
+	if err := sh.Run("go", "install", fmt.Sprintf("github.com/srdtrk/go-codegen@v%s", GO_CODEGEN_VERSION)); err != nil {
 		panic(fmt.Sprintf("failed to install go-codegen: %v", err))
 	}
 }