From a777a95e9af08b77e18c98827bc33986c2ee0491 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:44:25 +0000 Subject: [PATCH 01/10] ci: upgrade to GoReleaser v2 Signed-off-by: Babak K. Shandiz --- .github/workflows/deployment.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index d73b510e5df..512d707f56f 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -50,9 +50,11 @@ jobs: with: go-version-file: 'go.mod' - name: Install GoReleaser - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a + uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 with: - version: "~1.17.1" + # The version is pinned not only for security purposes, but also to avoid breaking + # our scripts, which rely on the specific file names generated by GoReleaser. + version: v2.13.1 install-only: true - name: Build release binaries env: @@ -103,9 +105,11 @@ jobs: security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k "$keychain_password" "$keychain" rm "$RUNNER_TEMP/cert.p12" - name: Install GoReleaser - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a + uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 with: - version: "~1.17.1" + # The version is pinned not only for security purposes, but also to avoid breaking + # our scripts, which rely on the specific file names generated by GoReleaser. + version: v2.13.1 install-only: true - name: Build release binaries env: @@ -157,9 +161,11 @@ jobs: with: go-version-file: 'go.mod' - name: Install GoReleaser - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a + uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 with: - version: "~1.17.1" + # The version is pinned not only for security purposes, but also to avoid breaking + # our scripts, which rely on the specific file names generated by GoReleaser. + version: v2.13.1 install-only: true - name: Install Azure Code Signing Client shell: pwsh From 5b9b012690c9eb701209fff20c2632e27fd2c10b Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:44:57 +0000 Subject: [PATCH 02/10] ci: upgrade `.goreleaser.yml` to v2 Signed-off-by: Babak K. Shandiz --- .goreleaser.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 23a8d24727e..0e593014a04 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,5 @@ +version: 2 + project_name: gh release: From c77471a7f4fd90dc32560186a650c9c33b86ee54 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:45:20 +0000 Subject: [PATCH 03/10] ci: quote 386 arch Signed-off-by: Babak K. Shandiz --- .goreleaser.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 0e593014a04..a0449ff0fb5 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -30,7 +30,7 @@ builds: - id: linux #build:linux goos: [linux] - goarch: [386, arm, amd64, arm64] + goarch: ["386", arm, amd64, arm64] env: - CGO_ENABLED=0 binary: bin/gh @@ -40,7 +40,7 @@ builds: - id: windows #build:windows goos: [windows] - goarch: [386, amd64, arm64] + goarch: ["386", amd64, arm64] hooks: post: - cmd: pwsh .\script\sign.ps1 '{{ .Path }}' From 5bd0626dc6a61d88c569806b22d5fed552893db1 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:46:23 +0000 Subject: [PATCH 04/10] ci: replace `archives.builds` with `archives.ids` Signed-off-by: Babak K. Shandiz --- .goreleaser.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index a0449ff0fb5..1c1ccf3603f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -52,7 +52,7 @@ builds: archives: - id: linux-archive - builds: [linux] + ids: [linux] name_template: "gh_{{ .Version }}_linux_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: true format: tar.gz @@ -61,7 +61,7 @@ archives: - LICENSE - ./share/man/man1/gh*.1 - id: macos-archive - builds: [macos] + ids: [macos] name_template: "gh_{{ .Version }}_macOS_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: true format: zip @@ -70,7 +70,7 @@ archives: - LICENSE - ./share/man/man1/gh*.1 - id: windows-archive - builds: [windows] + ids: [windows] name_template: "gh_{{ .Version }}_windows_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: false format: zip From b76ee8d74d118679d6bbab6a547a894cd50a6ef6 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:53:26 +0000 Subject: [PATCH 05/10] ci: remove redundant `archives.rlcp` Signed-off-by: Babak K. Shandiz --- .goreleaser.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1c1ccf3603f..5f8d46bdb86 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -56,7 +56,6 @@ archives: name_template: "gh_{{ .Version }}_linux_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: true format: tar.gz - rlcp: true files: - LICENSE - ./share/man/man1/gh*.1 @@ -65,7 +64,6 @@ archives: name_template: "gh_{{ .Version }}_macOS_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: true format: zip - rlcp: true files: - LICENSE - ./share/man/man1/gh*.1 @@ -74,7 +72,6 @@ archives: name_template: "gh_{{ .Version }}_windows_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: false format: zip - rlcp: true files: - LICENSE From 536bc9e895d74eef2999d1066855fbbc3a955f40 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:53:54 +0000 Subject: [PATCH 06/10] ci: replace `archives.format` with `archives.formats` array Signed-off-by: Babak K. Shandiz --- .goreleaser.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 5f8d46bdb86..c60fdfa8977 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -55,7 +55,7 @@ archives: ids: [linux] name_template: "gh_{{ .Version }}_linux_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: true - format: tar.gz + formats: [tar.gz] files: - LICENSE - ./share/man/man1/gh*.1 @@ -63,7 +63,7 @@ archives: ids: [macos] name_template: "gh_{{ .Version }}_macOS_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: true - format: zip + formats: [zip] files: - LICENSE - ./share/man/man1/gh*.1 @@ -71,7 +71,7 @@ archives: ids: [windows] name_template: "gh_{{ .Version }}_windows_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" wrap_in_directory: false - format: zip + formats: [zip] files: - LICENSE From aeb2c43aede86cbe6b516e8fe43e067da4b4f3fa Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:54:38 +0000 Subject: [PATCH 07/10] ci: limit deb/rpm packages to `linux` build Signed-off-by: Babak K. Shandiz --- .goreleaser.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index c60fdfa8977..15f5c2f1244 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -76,7 +76,8 @@ archives: - LICENSE nfpms: #build:linux - - license: MIT + - ids: [linux] + license: MIT maintainer: GitHub homepage: https://github.com/cli/cli bindir: /usr From 89c66542b8cd8a851d94fa0fa9fa5e888dcb9ec1 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:55:31 +0000 Subject: [PATCH 08/10] ci: upgrade to GoReleaser v2 CLI syntax for `--skip` Signed-off-by: Babak K. Shandiz --- script/release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/release b/script/release index 23bfb056b88..a3f19016d7d 100755 --- a/script/release +++ b/script/release @@ -94,7 +94,7 @@ build_local() { ;; esac [ -z "$tag_name" ] || export GORELEASER_CURRENT_TAG="$tag_name" - announce goreleaser release -f "$goreleaser_config" --clean --skip-validate --skip-publish --release-notes="$(mktemp)" + announce goreleaser release -f "$goreleaser_config" --clean --skip validate,publish,announce --release-notes="$(mktemp)" } if [ -n "$is_local" ]; then From dd6783868bd96388f3bc5594f289bfb300aa5c05 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:56:03 +0000 Subject: [PATCH 09/10] ci: fix binary artifact dir paths used in Windows job Signed-off-by: Babak K. Shandiz --- .github/workflows/deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 512d707f56f..b1840c22eda 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -213,7 +213,7 @@ jobs: MSI_VERSION="$(cut -d_ -f2 <<<"$MSI_NAME" | cut -d- -f1)" case "$MSI_NAME" in *_386 ) - source_dir="$PWD/dist/windows_windows_386" + source_dir="$PWD/dist/windows_windows_386_sse2" platform="x86" ;; *_amd64 ) @@ -221,7 +221,7 @@ jobs: platform="x64" ;; *_arm64 ) - source_dir="$PWD/dist/windows_windows_arm64" + source_dir="$PWD/dist/windows_windows_arm64_v8.0" platform="arm64" ;; * ) From 045afa4fc62878b992a9fbf7bad059201871cb4b Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 15 Dec 2025 18:56:38 +0000 Subject: [PATCH 10/10] ci: fix binary artficat dirs used in macos job Signed-off-by: Babak K. Shandiz --- script/pkgmacos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/pkgmacos b/script/pkgmacos index a5c9134f107..fed11c99f57 100755 --- a/script/pkgmacos +++ b/script/pkgmacos @@ -58,7 +58,7 @@ fi # gh-binary paths bin_path="/bin/gh" -arm64_bin="./dist/macos_darwin_arm64$bin_path" +arm64_bin="./dist/macos_darwin_arm64_v8.0$bin_path" amd64_bin="./dist/macos_darwin_amd64_v1$bin_path" # payload paths payload_root="pkg_payload"