Stamp v0.2.0 release in changelog #10
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 }} |