Skip to content

Commit cc41470

Browse files
committed
ci(publish): gate Maven Central release behind explicit publish_release flag
Add a workflow_dispatch boolean input 'publish_release' (default false) and require it on the publish-release job in addition to the existing v* tag guard. A v* tag push alone no longer auto-publishes to Maven Central; releasing now requires running the Publish workflow on the v* tag with publish_release enabled (tag AND flag). publish-snapshot is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JGZdUCy6YnTzKSJKA6B6KZ
1 parent 91d9799 commit cc41470

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
tags: ['v*']
1111
pull_request:
1212
workflow_dispatch:
13+
inputs:
14+
publish_release:
15+
description: "Publish a RELEASE to Maven Central. Off by default; the release publish runs only when this is true AND the workflow is run on a v* tag."
16+
type: boolean
17+
default: false
1318
env:
1419
JAVA_VERSION: '21'
1520
MODEL_URL: "https://huggingface.co/TheBloke/CodeLlama-7B-GGUF/resolve/main/codellama-7b.Q2_K.gguf"
@@ -945,7 +950,7 @@ jobs:
945950
946951
publish-release:
947952
name: Publish Release to Central
948-
if: needs.check-tag.result == 'success'
953+
if: needs.check-tag.result == 'success' && inputs.publish_release
949954
needs: [check-tag, crosscompile-linux-x86_64-cuda, crosscompile-android-aarch64-opencl, code-style]
950955
runs-on: ubuntu-latest
951956
environment: maven-central

0 commit comments

Comments
 (0)