Pegel

Release day

A signed tag starts everything else: two builds, the checksum file and the release page. Eight seconds of it, looped.

0:00
/0:08
Tagging v0.9.0 on 2026-11-09. The clip loops.

A release of Pegel is one signed tag. Everything after it runs in CI: a build for amd64, one for arm64, the checksum file and the release page, with the tag’s message as the notes. Nobody copies a binary by hand any more.

We moved to this after v0.8.1, which never shipped. Its arm64 build failed halfway through a release we were doing on a laptop, and the tag was already public. Since 0.8.2 a tag builds and publishes in CI only.

The workflow

One line was missing until 0.9.1. Without needs: build, the publish job wrote SHA256SUMS as soon as it could, and for v0.9.0 that was before the arm64 build had finished its second attempt.

name: release
on:
  push:
    tags: ['v*']
jobs:
  build:
    runs-on: ubuntu-24.04
    strategy:
      matrix:
        arch: [amd64, arm64]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version-file: go.mod
      - run: GOOS=linux GOARCH=${{ matrix.arch }} go build -trimpath -o dist/pegel ./cmd/pegel
      - run: tar -czf pegel_${GITHUB_REF_NAME#v}_linux_${{ matrix.arch }}.tar.gz -C dist pegel
      - uses: actions/upload-artifact@v4
        with:
          name: pegel-${{ matrix.arch }}
          path: '*.tar.gz'
  publish:
    needs: build # [!code ++]
    runs-on: ubuntu-24.04
    env:
      GH_TOKEN: ${{ github.token }}
    steps:
      - uses: actions/download-artifact@v4
        with:
          merge-multiple: true
      - run: sha256sum *.tar.gz > SHA256SUMS
      - run: gh release create "$GITHUB_REF_NAME" --notes-from-tag *.tar.gz SHA256SUMS

What we still do by hand

Writing the notes, and checking them. Before a release goes out on this site, one of us downloads the binary for each architecture and verifies it against SHA256SUMS. That step came from the checksum incident.

$ sha256sum -c SHA256SUMS --ignore-missing
pegel_0.9.1_linux_arm64.tar.gz: OK

Comments

Buy Logbuch