Skip to content

Commit e8dfd68

Browse files
clkaoclaude
andcommitted
release: guard pre-release (-pre) tags out of the stable channel
A hyphenated tag (v0.23.0-pre) should ship binary + content as a GitHub pre-release without promoting to stable. Three minimal guards: - release.yml: gate the "Stamp plugin manifests" step (which also advances refs/heads/stable) on `if: "!contains(github.ref, '-')"` so a -pre tag skips both manifest-stamp and stable-ref advance; a final vX.Y.Z still runs. - .goreleaser.yaml: `skip_upload: auto` on both Homebrew casks so a -pre tag does not bump the casks (keys off the parsed semver pre-release indicator). - .goreleaser.yaml: `release.prerelease: auto` so goreleaser actually marks the -pre tag a GitHub pre-release. goreleaser's default is `false`, so without this a -pre tag would publish as a full latest release. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 2422295 commit e8dfd68

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ jobs:
197197
# key is a DIFFERENT file (marketplace.json) and is left untouched here; it is
198198
# the moving-branch re-pull key (AC-2d), pj's surface.
199199
- name: Stamp plugin manifests to the release version
200+
# A hyphenated tag is a pre-release (v0.23.0-pre); it ships binary +
201+
# content as a GitHub pre-release but must stay OUT of the stable channel,
202+
# so skip both the manifest stamp and the stable-ref advance below. A final
203+
# vX.Y.Z has no hyphen and still runs, advancing stable as before.
204+
if: "!contains(github.ref, '-')"
200205
run: |
201206
set -euo pipefail
202207
RELEASE_VERSION="${GITHUB_REF_NAME#v}"

.goreleaser.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ checksum:
8989
algorithm: sha256
9090

9191
release:
92+
# `auto` marks the GitHub release as a pre-release (not "latest") when the tag
93+
# carries a semver pre-release indicator, e.g. v0.23.0-pre. goreleaser's own
94+
# default is `false`, so without this a -pre tag would publish as a full latest
95+
# release. This is the signal `homebrew_casks.skip_upload: auto` reads to skip
96+
# the cask bump for a pre-release; a final vX.Y.Z stays a normal release.
97+
prerelease: auto
9298
github:
9399
owner: spacedock-dev
94100
name: spacedock
@@ -104,6 +110,11 @@ homebrew_casks:
104110
# archive, installs the `next` plugin). Each pins ONLY its own channel's archive
105111
# via `ids: [<archive-id>]` so the two casks never cross-pin.
106112
- name: spacedock
113+
# `auto` skips the cask bump when goreleaser marks the release a pre-release
114+
# (release.prerelease: auto flags a hyphenated tag like v0.23.0-pre), so a
115+
# `-pre` cut never advances the stable `spacedock` cask. A final vX.Y.Z is not
116+
# a pre-release, so the cask still publishes.
117+
skip_upload: auto
107118
ids:
108119
- spacedock-stable
109120
repository:
@@ -140,6 +151,9 @@ homebrew_casks:
140151
# devBranch=next binary that installs the `next` plugin. Its on-demand re-pull
141152
# cadence rides the unchanged next-publish.yml; goreleaser only emits the cask.
142153
- name: spacedock@next
154+
# Same pre-release guard as the stable cask: a hyphenated (pre-release) tag
155+
# skips the edge cask bump, while a final vX.Y.Z still publishes it.
156+
skip_upload: auto
143157
ids:
144158
- spacedock-edge
145159
repository:

0 commit comments

Comments
 (0)