changelog: cut v0.3.0 (antigravity adapter; remove gemini) #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| # Manual escape hatch for the case where GitHub drops the tag-push | |
| # webhook (Actions outages, transient delivery failures, dedup of a | |
| # quick delete-and-re-push). Trigger from the Actions tab; pick the | |
| # tag to release in the "Use workflow from" dropdown so checkout | |
| # lands on that tag and goreleaser sees a clean release ref. | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| goreleaser: | |
| name: goreleaser | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # GoReleaser needs the full history so `git describe` and the | |
| # version derivation work. | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| cache: true | |
| # CHANGELOG.md is the authoritative source for release notes per | |
| # `docs/dev-plan/release-plan.md` § Release Notes Shape. Extract | |
| # just the most recent version section so the GitHub Release body | |
| # doesn't include the entire history. | |
| - name: Extract this release's notes from CHANGELOG.md | |
| run: | | |
| awk '/^## /{n++; if(n>1) exit} n==1' CHANGELOG.md > RELEASE_NOTES.md | |
| test -s RELEASE_NOTES.md # fail loudly if extraction produced nothing | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean --release-notes=RELEASE_NOTES.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Releases v0.1.0–v0.2.1 all published with empty bodies because | |
| # changelog.disable silently discarded the --release-notes file | |
| # (diffsmith-8jw). The extraction guard above only proves the file | |
| # exists; this proves the notes actually reached the release. | |
| - name: Verify published release has a non-empty body | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| body="$(gh release view "${GITHUB_REF_NAME}" --json body -q .body)" | |
| if [ -z "$(echo "$body" | tr -d '[:space:]')" ]; then | |
| echo "::error::release ${GITHUB_REF_NAME} published with an empty body" | |
| exit 1 | |
| fi |