feat: add gitops release workflow with goreleaser#1161
Merged
Conversation
Adds a PR-based release process: - Merging a 'release/vX.Y.Z' branch into v2 triggers the workflow - The workflow tags the commit, uses the PR body as release notes, and publishes the GitHub Release via goreleaser. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Contributor
|
This is really cool. |
sajayantony
approved these changes
May 9, 2026
sabre1041
approved these changes
May 10, 2026
sabre1041
left a comment
Contributor
There was a problem hiding this comment.
This is really great! thanks for putting this together. Only question is whether there should be a step that validates the tag follows Semantic Versioning
Otherwise, good to merge
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a PR-driven GitOps release process for oras-go (v2 branch) that auto-tags and publishes GitHub Releases via GoReleaser when a release/vX.Y.Z PR is merged.
Changes:
- Add a minimal
.goreleaser.yamlsuitable for a Go library release (no build artifacts; auto prerelease detection). - Add a GitHub Actions workflow to extract the version from
release/branch names, tag the merged commit, and publish a GitHub Release using the PR body as notes. - Document the new release workflow and provide an
acttest payload for local validation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
RELEASES.md |
Documents the new GitOps release PR process and local testing via act. |
.goreleaser.yaml |
Configures GoReleaser for library-only releases and prerelease auto-detection. |
.github/workflows/release.yml |
Implements the automated tagging + GitHub Release publication workflow. |
.github/act/release-event.json |
Provides a mock PR-closed event payload for local workflow testing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
3 tasks
This was referenced May 31, 2026
Merged
TerryHowe
added a commit
that referenced
this pull request
Jun 3, 2026
This is a security patch release addressing five advisories in the authentication, remote, and content layers, plus accumulated bug fixes and maintenance since v2.6.0. ## Security Fixes - Drop the `Authorization` header on cross-origin redirects to prevent origin credentials leaking to a redirect target on a different scheme/port of the same host ([GHSA-vh4v-2xq2-g5cg](GHSA-vh4v-2xq2-g5cg)) - Validate the bearer `realm` host before sending credentials to prevent credential exfiltration to an attacker-controlled token service, including TLS downgrades and IP-literal metadata endpoints; adds `TrustedRealmHosts` ([GHSA-28r5-37g7-p6mp](https://github.com/oras-project/oras-go/security/advisories/GHSA-28r5-37g7-p6mp), [GHSA-xf85-363p-868w](GHSA-xf85-363p-868w)) - Validate the `Location` host before blob upload to prevent credentials being forwarded to a cross-host upload endpoint (SSRF / CWE-918) (#1152, [GHSA-jxpm-75mh-9fp7](GHSA-jxpm-75mh-9fp7)) - Reject descriptor sizes exceeding 32 MiB in `content.ReadAll` to prevent a crafted OCI layout from triggering a `makeslice` panic and crashing the process (#1153, [GHSA-f36w-mj3v-6jqv](https://github.com/oras-project/oras-go/security/advisories/GHSA-f36w-mj3v-6jqv)) - Resolve symlinks when enforcing the `workingDir` write boundary in `content/file`, blocking writes that escape the boundary via a symlinked path component when `AllowPathTraversalOnWrite=false` ## Bug Fixes - `graph.Memory` should use digest as map key (#1095) - Fix credentials key for the Docker `registry-1` host (#966) - Support an empty credentials file (#959) ## Other Changes - Add GitOps release workflow with goreleaser (#1161) - Shift the Go support window to [1.24, 1.25] (#991) - Run `go modernize` (#1005) - Sync `CODEOWNERS` and `OWNERS.md` from main to v2 (#1122) - Remove scripts reference from the Makefile (#960) - Bump `golang.org/x/sync` 0.14.0 → 0.20.0 (#971, #978, #1001, #1037, #1078, #1121) - Bump GitHub Actions: `actions/checkout` 4→5 (#989), `actions/setup-go` 5→6 (#998), `actions/stale` 9→10 (#997), `github/codeql-action` 3→4 (#1016) Signed-off-by: Terry Howe <terrylhowe@gmail.com>
Closed
TerryHowe
added a commit
to TerryHowe/oras-go
that referenced
this pull request
Jun 22, 2026
## Summary Replaces the manual issue-vote → tag → release process with a PR-based GitOps workflow. ## Changes - **`.goreleaser.yaml`** — Minimal config for a Go library (no binary builds, archives, or checksums). `prerelease: auto` marks tags containing `-alpha`, `-beta`, or `-rc` as pre-release on GitHub. - **`.github/workflows/release.yml`** — Triggers on merge of a `release/vX.Y.Z` branch into `v2`. Extracts the version from the branch name, tags the merge commit, and publishes the GitHub Release using the PR body as release notes. The `goreleaser/goreleaser-action` is pinned to `e435ccd` (v6.4.0). - **`RELEASES.md`** — Documents the full release process, the `--allow-empty` branch convention, and three levels of local testing with `act`. - **`.github/act/release-event.json`** — Mock PR event payload for local workflow testing. ## How a release works 1. Create a branch named `release/vX.Y.Z` from `v2` with an empty commit (required for GitHub to allow a PR with no code diff): ```bash git fetch upstream git checkout -b release/v2.7.0 upstream/v2 git commit --allow-empty -s -m "chore: prepare release v2.7.0" git push origin release/v2.7.0 ``` 2. Open a PR to `v2` — write the release notes in the PR description (same format as today's release issues) 3. Get the required approvals via branch protection (replaces the issue vote) 4. Merge — the workflow automatically tags the commit and publishes the GitHub Release using the PR body as release notes The release PR does not need to contain the changes being released — those are already on `v2`. The PR is purely a trigger. ## Local testing Three levels of validation are available without triggering a real release: ```bash # 1. Validate goreleaser config goreleaser check # 2. Validate workflow structure and job matching (dry run) act pull_request -e .github/act/release-event.json -W .github/workflows/release.yml -n # 3. Full end-to-end run (Colima + cached actions required) act pull_request \ -e .github/act/release-event.json \ -W .github/workflows/release.yml \ -s GITHUB_TOKEN=fake \ --pull=false \ --action-offline-mode \ --container-daemon-socket - ``` The end-to-end run executes through checkout → Go setup → version extraction (printing `version=vX.Y.Z`) → then fails at `git push` with a permission error. That is the expected safe stopping point — no tag is pushed and no release is created. ## Notes - Branch protection on `v2` should require the same approval quorum currently used in release issues (3 of 4 owners) - Pre-release tags (`-alpha`, `-beta`, `-rc`) are automatically marked as pre-release on GitHub 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Terry Howe <terrylhowe@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit d593d50) Signed-off-by: Terry Howe <terrylhowe@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the manual issue-vote → tag → release process with a PR-based GitOps workflow.
Changes
.goreleaser.yaml— Minimal config for a Go library (no binary builds, archives, or checksums).prerelease: automarks tags containing-alpha,-beta, or-rcas pre-release on GitHub..github/workflows/release.yml— Triggers on merge of arelease/vX.Y.Zbranch intov2. Extracts the version from the branch name, tags the merge commit, and publishes the GitHub Release using the PR body as release notes. Thegoreleaser/goreleaser-actionis pinned toe435ccd(v6.4.0).RELEASES.md— Documents the full release process, the--allow-emptybranch convention, and three levels of local testing withact..github/act/release-event.json— Mock PR event payload for local workflow testing.How a release works
release/vX.Y.Zfromv2with an empty commit (required for GitHub to allow a PR with no code diff):git fetch upstream git checkout -b release/v2.7.0 upstream/v2 git commit --allow-empty -s -m "chore: prepare release v2.7.0" git push origin release/v2.7.0v2— write the release notes in the PR description (same format as today's release issues)The release PR does not need to contain the changes being released — those are already on
v2. The PR is purely a trigger.Local testing
Three levels of validation are available without triggering a real release:
The end-to-end run executes through checkout → Go setup → version extraction (printing
version=vX.Y.Z) → then fails atgit pushwith a permission error. That is the expected safe stopping point — no tag is pushed and no release is created.Notes
v2should require the same approval quorum currently used in release issues (3 of 4 owners)-alpha,-beta,-rc) are automatically marked as pre-release on GitHub🤖 Generated with Claude Code