镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Only publish to Central from v* tags - #139

Merged
yawkat merged 2 commits into
mainfrom
fix/issue-118
Sep 25, 2026
Merged

yawkat merged 2 commits into
mainfrom
fix/issue-118

Conversation

@yawkat

@yawkat yawkat commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Fixes #118.

Before this change, publishing ran on any release event, or on any workflow_dispatch with publish=true, regardless of the ref. Now the assemble job computes
PUBLISH = startsWith(github.ref, 'refs/tags/v') && (github.event_name == 'release' || inputs.publish)
once, and the four credentialed/non-credentialed step pairs use env.PUBLISH == 'true' / != 'true'. A new first step, Check publish ref, fails the job with an error when a publish is requested from a ref that isn't a v* tag, so it doesn't silently skip. This applies to both a branch dispatch with publish=true and a release on a non-v tag.

Limitations:

  • A dispatch runs the workflow file from the chosen ref, so branches created before this change still carry the old condition. Real enforcement would be a GitHub environment that holds the Central/GPG secrets and only allows v* tags. That is a repo-settings follow-up.
  • The check runs inside assemble, after the native builds.

🤖 Generated with Claude Code

Compute the publish condition once in the assemble job and require the
ref to be a v* tag for both release events and workflow_dispatch. A
publish request from any other ref now fails instead of deploying a
SNAPSHOT or commit-hash version.

Fixes #118

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yawkat yawkat added this to the 1.11.4 milestone Sep 25, 2026
@yawkat
yawkat enabled auto-merge (squash) September 25, 2026 15:45
# Conflicts:
#	.github/workflows/build-all-and-publish.yml
@yawkat
yawkat merged commit 68d4bfc into main Sep 25, 2026
3 checks passed
@yawkat
yawkat deleted the fix/issue-118 branch September 25, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only publish to Central from v* tags

1 participant