diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd244ae2..07b30347 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + # We need to fetch tags because we want to name our snapshot artifacts -commit-. + # We don't use checkout/fetch-tags: true because it's broken. + # For more information see: https://github.com/actions/checkout/issues/1471 + - name: Fetch tags explicitly + run: git fetch --prune --unshallow --tags + - name: Set up Go uses: actions/setup-go@v5 with: diff --git a/.goreleaser-ci.yaml b/.goreleaser-ci.yaml index bda07c53..4f243966 100644 --- a/.goreleaser-ci.yaml +++ b/.goreleaser-ci.yaml @@ -1,6 +1,6 @@ project_name: sparrow snapshot: - name_template: "commit-{{ .ShortCommit }}" + version_template: "{{ .Tag }}-commit-{{ .ShortCommit }}" builds: - env: [CGO_ENABLED=0] ldflags: