Skip to content

Releases and verification

Markdown · llms.txt

This document describes the process for releasing new versions of opa-authzen-plugin.

This project currently uses Semantic Versioning: vMAJOR.MINOR.PATCH

  1. Verify tests pass

    Terminal window
    make clean build test
    go test -v -race ./...
  2. Run linting

    Terminal window
    make fmt vet lint
  3. Check dependencies

    Terminal window
    go list -m all
    make licenses
  4. Update CHANGELOG.md

    • Move "Unreleased" section content to new version heading
    • Follow Keep a Changelog format
    • Include OPA version compatibility note
    • Set newTag in example/kubernetes/kustomization.yaml to the new version (without the v)
    • First release from dyokto only: drop newName from example/kubernetes/kustomization.yaml, and point PDP_IMAGE in interop/todo/Makefile and the default in interop/todo/docker-compose.yaml at ghcr.io/dyokto/opa-authzen-plugin. Until then they pull the last image published under kanywst
    • The heading must read ## [vX.Y.Z] - YYYY-MM-DD: the tag workflow builds the release body from that section, and fails if it cannot find it. Preview the body with make release-notes TAG=vX.Y.Z
  5. Dry-run the release locally (optional)

    Runs the same GoReleaser pipeline CI will run, into dist/, without publishing anything. Signing is skipped because keyless signing needs a CI OIDC token.

    Terminal window
    make release
  6. Create annotated git tag

    Terminal window
    git tag -a vX.Y.Z -m "Release vX.Y.Z"
    git push origin vX.Y.Z
  7. Let the tag workflows run

    Pushing the tag triggers two workflows. post-tag.yaml runs GoReleaser, which cross-compiles the binaries, generates an SPDX SBOM, writes and signs checksums.txt, and opens a draft GitHub Release with all of it attached. The draft's body is written by build/release-notes.sh: the release date, the CHANGELOG section for the tag, and the verification commands below with the image tag filled in. publish.yaml builds and pushes the multi-arch image to ghcr.io/dyokto/opa-authzen-plugin with an SBOM and provenance attestation, then signs the pushed digest.

  8. Publish the draft Release

    • Confirm both workflows are green and every asset is attached
    • Read the generated body; it should need no edits
    • Mark as "Latest Release" if appropriate

Release artifacts are signed with Sigstore keyless signing, so there is no long-lived key to publish or rotate. Each command below pins the signer identity to this repository's own tag workflow, which is what makes the check meaningful: a signature produced by any other workflow, repository, or laptop fails.

The repository moved from kanywst/opa-authzen-plugin to dyokto/opa-authzen-plugin after v0.12.1. For v0.12.1 and earlier, the signer identity and the image both name the old owner: replace dyokto with kanywst in the image name and in each --certificate-identity-regexp below, for example '^https://github\.com/kanywst/opa-authzen-plugin/\.github/workflows/publish\.yaml@refs/tags/v'. The release body of every version already carries the right commands.

Binaries — verify the signature on checksums.txt first, then check the binary against it. The signature and its certificate travel together in checksums.txt.sigstore.json, a Sigstore bundle:

Terminal window
cosign verify-blob checksums.txt \
--bundle checksums.txt.sigstore.json \
--certificate-identity-regexp '^https://github\.com/dyokto/opa-authzen-plugin/\.github/workflows/post-tag\.yaml@refs/tags/v' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
sha256sum --check --ignore-missing checksums.txt

Container image:

Terminal window
cosign verify ghcr.io/dyokto/opa-authzen-plugin:X.Y.Z \
--certificate-identity-regexp '^https://github\.com/dyokto/opa-authzen-plugin/\.github/workflows/publish\.yaml@refs/tags/v' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com

Bill of materials — the image carries a BuildKit-generated SPDX SBOM and a SLSA provenance attestation, and the GitHub Release carries an SBOM of the source module as opa_authzen_sbom.spdx.json:

Terminal window
docker buildx imagetools inspect ghcr.io/dyokto/opa-authzen-plugin:X.Y.Z --format '{{ json .SBOM }}'
  • Run tests on the minimum supported OPA version specified in go.mod
  • Verify example policies still work
  • Check for API-breaking changes
  • Run go get -u to check for available updates
  • Review security advisories: go list -u -m all
  • Update go.mod and go.sum if updates are important
  • README.md reflects current feature set
  • Example policies are up-to-date
  • API documentation is accurate
Terminal window
make docker-build # Uses git tags for versioning
# Ensure git tags are properly set
git describe --tags --always --dirty
Terminal window
make clean release
# GoReleaser writes everything under dist/
ls -la dist/

To check the configuration itself without building:

Terminal window
go run github.com/goreleaser/goreleaser/v2@$(make -s print-goreleaser-version) check
  • Monitor for security issues in dependencies via GitHub's Dependabot
  • Respond to issues and PRs in a timely manner
  • Release patch versions for critical bugs immediately
  • Plan minor versions in coordination with OPA releases