Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

fix(release): start the changelog at the previous CLI tag (#1179)

Shukan Shah02795fc00407
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4e56d068..e3f91ca2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -72,6 +72,19 @@ jobs:
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: goreleaser check
+ # GoReleaser takes the nearest tag of any kind as the previous release, so an
+ # ext-v* or sdk-js-v* tag between two CLI releases cuts the changelog short:
+ # v1.3.47's started at sdk-js-v0.2.0 and left out everything before it. Only
+ # v* tags count here, and both ends are passed to the publish step.
+ - name: Find the previous CLI release
+ id: tags
+ shell: bash
+ run: |
+ set -euo pipefail
+ previous="$(git describe --tags --abbrev=0 --match 'v[0-9]*' "${GITHUB_REF_NAME}^" 2>/dev/null || true)"
+ echo "previous=$previous" >> "$GITHUB_OUTPUT"
+ echo "Changelog covers ${previous:-the start of history}..${GITHUB_REF_NAME}"
+
# Run from cli/beacon because the release pre-hook writes target-specific
# beacon-hooks binaries to a shared embedded path; --parallelism 1 avoids
# racing on it.
@@ -80,6 +93,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
+ GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
+ GORELEASER_PREVIOUS_TAG: ${{ steps.tags.outputs.previous }}
run: goreleaser release --clean --parallelism 1
package:
diff --git a/CLAUDE.md b/CLAUDE.md
index 72d6a752..ee71aeb7 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -359,6 +359,10 @@ CI release automation should:
- Trigger only on pushed tags matching `v*`.
- Check out the tagged commit with full history (`fetch-depth: 0`) so GoReleaser
can compute changelogs from the previous tag.
+- Name that previous tag for GoReleaser (`GORELEASER_PREVIOUS_TAG`, the nearest
+ `v*` tag before this one). Left to itself, GoReleaser takes the nearest tag of
+ any kind, so an `ext-v*` or `sdk-js-v*` tag between two CLI releases cuts the
+ changelog short; v1.3.47's started at `sdk-js-v0.2.0`.
- Build or restore the collector binaries expected by `.goreleaser.yaml` under
`collector-builder/dist/beacon-otelcol/<goos>_<goarch>/beacon-otelcol`.
- Run `goreleaser check` before publishing.