From 582e7314f6b679a9b6b00ad9df8ca248d1b88151 Mon Sep 17 00:00:00 2001 From: shipengqi Date: Fri, 26 Sep 2025 11:13:14 +0800 Subject: [PATCH 1/5] fix: e3e security issue --- .github/workflows/e2e.yaml | 3 +++ .goreleaser.yaml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 1b1c515..a385940 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -9,6 +9,9 @@ on: - "example/**" - "docs/**" - "README.md" +permissions: + contents: read + jobs: # Build the commitizen and cache it so the workers can get it. build: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d417ae3..dbacda1 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -3,7 +3,7 @@ dist: _output snapshot: - name_template: '{{ incpatch .Version }}-next' + version_template: '{{ incpatch .Version }}-next' builds: - env: - CGO_ENABLED=0 @@ -43,7 +43,7 @@ archives: # Default is empty. format_overrides: - goos: windows - format: zip + format: [ 'zip' ] checksum: name_template: 'CHECKSUM' changelog: From 7628622aceacbbdc15bd8cd8d0d9a11792d7e5fc Mon Sep 17 00:00:00 2001 From: PengQi Shi Date: Sun, 28 Sep 2025 19:51:28 +0800 Subject: [PATCH 2/5] chore: release commitizen to homebrew (#158) * chore: release commitizen to homebrew * chore: lint matrix --- .github/workflows/lint.yaml | 2 +- .goreleaser.yaml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 4ce179f..8424f67 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -18,7 +18,7 @@ jobs: strategy: matrix: go: [ '1.23', '1.24', '1.25' ] - os: [ ubuntu-latest, windows-latest ] + os: [ ubuntu-latest, windows-latest, macos-latest ] permissions: contents: read # for actions/checkout to fetch code pull-requests: read # for golangci/golangci-lint-action to fetch pull requests diff --git a/.goreleaser.yaml b/.goreleaser.yaml index dbacda1..a5e5c87 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -85,6 +85,17 @@ scoops: description: The commitizen command line utility, without nodejs. Forked from commitizen-go, fixes some issues of commitizen-go and supports more new features. license: MIT +homebrew_casks: + - name: commitizen + repository: + owner: shipengqi + name: homebrew-casks + description: "The commitizen command line utility, without nodejs. Forked from commitizen-go, fixes some issues of commitizen-go and supports more new features." + homepage: "https://github.com/shipengqi/commitizen" + binary: "commitizen" + url: + template: "https://github.com/shipengqi/commitizen/releases/download/{{ .Tag }}/commitizen-{{ .Tag }}-darwin-arm64.tar.gz" + # modelines, feel free to remove those if you don't want/use them: # yaml-language-server: $schema=https://goreleaser.com/static/schema.json # vim: set ts=2 sw=2 tw=0 fo=cnqoj From eac471f5780dbf8482f9c4355a41ced5a3d5058b Mon Sep 17 00:00:00 2001 From: shipengqi Date: Sun, 28 Sep 2025 19:55:58 +0800 Subject: [PATCH 3/5] chore: add goreleaser version --- .goreleaser.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a5e5c87..7dcd874 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,5 +1,6 @@ # This is an example .goreleaser.yml file with some sensible defaults. # Make sure to check the documentation at https://goreleaser.com +version: 2 dist: _output snapshot: From 858a9b3dbd6b905028c16fa8338b11c626a19f48 Mon Sep 17 00:00:00 2001 From: shipengqi Date: Sun, 28 Sep 2025 20:05:10 +0800 Subject: [PATCH 4/5] chore: update format_overrides of goreleaser --- .goreleaser.yaml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7dcd874..b5107bd 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,7 +1,7 @@ # This is an example .goreleaser.yml file with some sensible defaults. # Make sure to check the documentation at https://goreleaser.com -version: 2 +version: 2 dist: _output snapshot: version_template: '{{ incpatch .Version }}-next' @@ -41,10 +41,26 @@ archives: - CHANGELOG/** # Can be used to change the archive formats for specific GOOSs. # Most common use case is to archive as zip on Windows. - # Default is empty. format_overrides: - - goos: windows - format: [ 'zip' ] + - # Which GOOS to override the format for. + goos: windows + + # The formats to use for the given GOOS. + # + # Valid options are: + # - `tar.gz` + # - `tgz` + # - `tar.xz` + # - `txz` + # - `tar.zst` + # - `tzst` # Since: v2.1. + # - `tar` + # - `gz` + # - `zip` + # - `binary` # be extra-cautious with the file name template in this case! + # - `none` # skips this archive + # + formats: ["zip"] # Plural form, multiple formats. Since: v2.6 checksum: name_template: 'CHECKSUM' changelog: From 19481f0ddc19a5a513c3a41739a27e3209d18e35 Mon Sep 17 00:00:00 2001 From: shipengqi Date: Sun, 28 Sep 2025 20:28:32 +0800 Subject: [PATCH 5/5] chore: homwbrew archive --- .goreleaser.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b5107bd..db6a272 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -111,7 +111,7 @@ homebrew_casks: homepage: "https://github.com/shipengqi/commitizen" binary: "commitizen" url: - template: "https://github.com/shipengqi/commitizen/releases/download/{{ .Tag }}/commitizen-{{ .Tag }}-darwin-arm64.tar.gz" + template: "https://github.com/shipengqi/commitizen/releases/download/{{ .Tag }}/commitizen-{{ .Tag }}-{{ .Os }}-{{ .Arch }}.tar.gz" # modelines, feel free to remove those if you don't want/use them: # yaml-language-server: $schema=https://goreleaser.com/static/schema.json