fix: pin Go version in goreleaser to go.mod + broaden version regex test (#199)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5f403e1..744d04d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -18,6 +18,7 @@
       - name: Set up Go
         uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
         with:
+          go-version-file: go.mod
           cache: false
       - name: Run GoReleaser
         uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
diff --git a/test/version_test.go b/test/version_test.go
index 9935d6f..33869a9 100644
--- a/test/version_test.go
+++ b/test/version_test.go
@@ -34,7 +34,7 @@
 
 	// Enforce a particular format so that a regex can extract the version easily.
 	actual := out.String()
-	expectedProdRegex := "Google Container Registry Docker credential helper [0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+-[0-9a-f]+\n"
+	expectedProdRegex := "Google Container Registry Docker credential helper [0-9]+\\.[0-9]+\\.[0-9]+(-[0-9]+-[0-9a-f]+)?\n"
 	if match, _ := regexp.MatchString(expectedProdRegex, actual); !match {
 		// Fail if not a dev version.
 		expectedDevString := "Google Container Registry Docker credential helper (devel)\n"