Skip to content

Publish GitHub Releases with changes between tags#2

Merged
eric642 merged 1 commit into
mainfrom
worktree-feat-pub-tag
Jun 4, 2026
Merged

Publish GitHub Releases with changes between tags#2
eric642 merged 1 commit into
mainfrom
worktree-feat-pub-tag

Conversation

@eric642

@eric642 eric642 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

What

Adds a release workflow so that publishing a version on GitHub shows the changes between the two versions.

  • .github/workflows/release.yml — triggers on pushing a v* tag (matches the existing git tag vX.Y.Z && git push --tags flow). It re-runs go vet ./... and go test -race ./... against the tagged commit as a pre-publish gate, then creates a GitHub Release via gh release create --verify-tag.
  • scripts/release-notes.sh — generates the release body: every non-merge commit since the previous v* tag (- subject (shortSHA), auto-linkified by GitHub) plus a compare/<prev>...<new> link. Locally runnable to preview a release before tagging: bash scripts/release-notes.sh vX.Y.Z.
  • CHANGELOG.md — documents that pushing a tag now auto-publishes the release, and how to preview notes locally.

Example release body

## What's Changed

- Accept 200 responses when connecting sandboxes (697a2c3)
- Move CI lint to golangci-lint v2 built from source (67df31c)

**Full Changelog**: https://github.com/eric642/e2b-go-sdk/compare/v0.1.1...v0.2.0

Notes

  • The script handles the first-release case (no previous tag → list full history + a commits/<tag> link), the no-changes case, and a missing-tag error.
  • fetch-depth: 0 is set so the workflow has full history/tags to diff against.
  • Since these are new files, release.yml must land on main first; tags pushed afterward will trigger it.

Verification

  • bash -n syntax check + valid YAML parse.
  • Ran scripts/release-notes.sh against the existing v0.1.0 and v0.1.1 tags — correct diff ranges, compare links, and git@-remote → owner/repo parsing.

🤖 Generated with Claude Code

Pushing a vX.Y.Z tag now triggers a release workflow that gates on
go vet + go test -race, then publishes a GitHub Release. The body lists
every non-merge commit since the previous v* tag plus a compare link, so
each release shows exactly what changed between versions.

scripts/release-notes.sh generates the notes and is locally runnable for
previewing a release body before tagging.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eric642
eric642 merged commit e741406 into main Jun 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant