detached 4d847ec

release: remove debug job, gate brew upload on HOMEBREW_TAP_TOKEN

- debug job served its purpose (proved workflow_run fires correctly)
  and is gone
- restore the [skip-release] guard
- brews.skip_upload is now a go-template that evaluates to true when
  HOMEBREW_TAP_TOKEN is empty, so tag pushes before the tap is
  created don't fail the whole release (v0.0.1 cut fine but the
  goreleaser exit code was 1 because the brew step 401'd)
commit
4d847ec6335d747449fe362aee2de0b983b0b74c
author
patriceckhart · · 2026-04-18 09:21 UTC
parent
75aa6d4
signature
unsigned
2 files · +12 -28
M .github/workflows/release.yml +6 -23
@@ -30,28 +30,10 @@ concurrency:
3030 cancel-in-progress: false
3131
3232 jobs:
33- debug:
34- # One-shot diagnostic job with no if-filter: dumps the full
35- # workflow_run context so we can see what fields are actually
36- # populated on the webhook payload. Remove once the release job
37- # starts firing reliably.
38- runs-on: ubuntu-latest
39- steps:
40- - name: dump workflow_run
41- env:
42- WR: ${{ toJSON(github.event.workflow_run) }}
43- run: |
44- echo "conclusion: ${{ github.event.workflow_run.conclusion }}"
45- echo "head_branch: ${{ github.event.workflow_run.head_branch }}"
46- echo "head_sha: ${{ github.event.workflow_run.head_sha }}"
47- echo "---"
48- printenv WR | head -c 2000
49-
5033 release:
51- needs: debug
5234 # Only run when ci succeeded and we're on main, and when the head
5335 # commit doesn't opt out via [skip-release].
54- if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
36+ if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' && !contains(github.event.workflow_run.head_commit.message, '[skip-release]') }}
5537 runs-on: ubuntu-latest
5638 steps:
5739 - name: checkout
@@ -113,7 +95,8 @@ jobs:
11395 # goreleaser reads the tag we just pushed and builds binaries
11496 # for every (goos, goarch) combination in .goreleaser.yaml.
11597 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116- # Optional: PAT with `repo` scope for patriceckhart/homebrew-tap
117- # so we can push a Formula/zot.rb update on every release.
118- # If unset, goreleaser skips the brew step (skip_upload: auto).
119- HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
98+ # Optional PAT with `repo` scope for patriceckhart/homebrew-tap.
99+ # Always exported (as empty string when the secret is unset)
100+ # so the goreleaser template that gates the brew upload on
101+ # this value can evaluate without errors.
102+ HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN || '' }}
@@ -30,28 +30,10 @@ concurrency:
30 cancel-in-progress: false30 cancel-in-progress: false
31 31
32 jobs:32 jobs:
33- debug:
34- # One-shot diagnostic job with no if-filter: dumps the full
35- # workflow_run context so we can see what fields are actually
36- # populated on the webhook payload. Remove once the release job
37- # starts firing reliably.
38- runs-on: ubuntu-latest
39- steps:
40- - name: dump workflow_run
41- env:
42- WR: ${{ toJSON(github.event.workflow_run) }}
43- run: |
44- echo "conclusion: ${{ github.event.workflow_run.conclusion }}"
45- echo "head_branch: ${{ github.event.workflow_run.head_branch }}"
46- echo "head_sha: ${{ github.event.workflow_run.head_sha }}"
47- echo "---"
48- printenv WR | head -c 2000
49-
50 release:33 release:
51- needs: debug
52 # Only run when ci succeeded and we're on main, and when the head34 # Only run when ci succeeded and we're on main, and when the head
53 # commit doesn't opt out via [skip-release].35 # commit doesn't opt out via [skip-release].
54- if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}36+ if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' && !contains(github.event.workflow_run.head_commit.message, '[skip-release]') }}
55 runs-on: ubuntu-latest37 runs-on: ubuntu-latest
56 steps:38 steps:
57 - name: checkout39 - name: checkout
@@ -113,7 +95,8 @@ jobs:
113 # goreleaser reads the tag we just pushed and builds binaries95 # goreleaser reads the tag we just pushed and builds binaries
114 # for every (goos, goarch) combination in .goreleaser.yaml.96 # for every (goos, goarch) combination in .goreleaser.yaml.
115 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}97 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116- # Optional: PAT with `repo` scope for patriceckhart/homebrew-tap98+ # Optional PAT with `repo` scope for patriceckhart/homebrew-tap.
117- # so we can push a Formula/zot.rb update on every release.99+ # Always exported (as empty string when the secret is unset)
118- # If unset, goreleaser skips the brew step (skip_upload: auto).100+ # so the goreleaser template that gates the brew upload on
119- HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}101+ # this value can evaluate without errors.
102+ HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN || '' }}
M .goreleaser.yaml +6 -5
@@ -102,8 +102,9 @@ release:
102102 # Optional: publish a Homebrew formula to a tap repo on every release.
103103 # Requires the tap repo to exist at github.com/patriceckhart/homebrew-tap
104104 # and a PAT with `repo` scope exported as `HOMEBREW_TAP_TOKEN` in the
105-# release workflow. Safe to leave enabled even before the tap exists;
106-# goreleaser skips it when the token isn't set.
105+# release workflow. The skip_upload expression disables the step when
106+# the token isn't set, so tag pushes before the tap is created don't
107+# fail the whole release.
107108 brews:
108109 - repository:
109110 owner: patriceckhart
@@ -117,6 +118,6 @@ brews:
117118 bin.install "zot"
118119 test: |
119120 system "#{bin}/zot", "--help"
120- # Only publish the formula when the token is actually set, so
121- # ordinary tag pushes from forks don't explode.
122- skip_upload: auto
121+ # Skip the formula upload when HOMEBREW_TAP_TOKEN is empty. Auto
122+ # only skips for prereleases/snapshots, which isn't what we want.
123+ skip_upload: '{{ if eq .Env.HOMEBREW_TAP_TOKEN "" }}true{{ else }}false{{ end }}'
@@ -102,8 +102,9 @@ release:
102 # Optional: publish a Homebrew formula to a tap repo on every release.102 # Optional: publish a Homebrew formula to a tap repo on every release.
103 # Requires the tap repo to exist at github.com/patriceckhart/homebrew-tap103 # Requires the tap repo to exist at github.com/patriceckhart/homebrew-tap
104 # and a PAT with `repo` scope exported as `HOMEBREW_TAP_TOKEN` in the104 # and a PAT with `repo` scope exported as `HOMEBREW_TAP_TOKEN` in the
105-# release workflow. Safe to leave enabled even before the tap exists;105+# release workflow. The skip_upload expression disables the step when
106-# goreleaser skips it when the token isn't set.106+# the token isn't set, so tag pushes before the tap is created don't
107+# fail the whole release.
107 brews:108 brews:
108 - repository:109 - repository:
109 owner: patriceckhart110 owner: patriceckhart
@@ -117,6 +118,6 @@ brews:
117 bin.install "zot"118 bin.install "zot"
118 test: |119 test: |
119 system "#{bin}/zot", "--help"120 system "#{bin}/zot", "--help"
120- # Only publish the formula when the token is actually set, so121+ # Skip the formula upload when HOMEBREW_TAP_TOKEN is empty. Auto
121- # ordinary tag pushes from forks don't explode.122+ # only skips for prereleases/snapshots, which isn't what we want.
122- skip_upload: auto123+ skip_upload: '{{ if eq .Env.HOMEBREW_TAP_TOKEN "" }}true{{ else }}false{{ end }}'

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close