Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,47 @@ on:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
with:
release-type: go
release-as: "0.1.0"

build:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.release-please.outputs.tag_name }}
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true

# The e2e package drives a real `claude` binary, which no runner has.
- name: Test
run: |
mapfile -t pkgs < <(go list ./... | grep -v /e2e)
go test "${pkgs[@]}"

- uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 0 additions & 37 deletions .github/workflows/release.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ e2e/

- `release-please` (release-type `go`) runs on every push to `main`, maintaining a Release PR with `CHANGELOG.md` and the next version bump computed from commit history
- Commits and PR titles must follow Conventional Commits (`feat:`, `fix:`, `chore:`, …) — release-please can't decide a bump or write the changelog otherwise
- Merging the Release PR tags the release and creates the GitHub Release; the tag push triggers `.github/workflows/release.yaml`, which builds and attaches binaries via `goreleaser` (`.goreleaser.yaml`)
- Merging the Release PR tags the release and creates the GitHub Release; a second job in the same workflow (`.github/workflows/release-please.yaml`), gated on `release_created`, then builds and attaches binaries via `goreleaser` (`.goreleaser.yaml`) — a tag-push-triggered workflow wouldn't fire here, since GitHub doesn't cascade a new run from a ref created by the workflow's own `GITHUB_TOKEN`

## Key conventions

Expand Down