Skip to content

Commit c98ab48

Browse files
committed
chore: tidied up
1 parent 536c351 commit c98ab48

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,12 @@ jobs:
183183
BRANCH_NAME="${{ steps.version-type.outputs.BRANCH_NAME }}"
184184
NEW_VERSION=$(npm pkg get version | tr -d \")
185185
PUBLISH_ARGS="--access public"
186-
IS_STANDARD_BRANCH=false
187-
188-
# Determine if this is a standard branch
189-
if [[ "$BRANCH_NAME" == "main" || "$BRANCH_NAME" =~ release/v([0-9]+) ]]; then
190-
IS_STANDARD_BRANCH=true
191-
fi
192186
193187
# First priority: Check for custom tag from version-type step
194188
if [[ -n "${{ steps.version-type.outputs.CUSTOM_NPM_TAG }}" ]]; then
195189
DIST_TAG="${{ steps.version-type.outputs.CUSTOM_NPM_TAG }}"
196190
PUBLISH_ARGS="$PUBLISH_ARGS --tag $DIST_TAG"
197-
echo "Publishing v$NEW_VERSION with custom tag '$DIST_TAG' (from version-type step)"
191+
echo "Publishing v$NEW_VERSION with custom tag '$DIST_TAG'"
198192
# Second priority: Check for branch-specific tags
199193
elif [[ "$BRANCH_NAME" == "main" ]]; then
200194
echo "Publishing v$NEW_VERSION from main -> using default 'latest' tag"
@@ -206,11 +200,8 @@ jobs:
206200
else
207201
# Safety check for non-standard branches
208202
if [[ "${{ github.event_name }}" == "workflow_dispatch" && -z "${{ github.event.inputs.npm_tag }}" ]]; then
209-
echo "⚠️ WARNING: Publishing from non-standard branch '$BRANCH_NAME' without a custom npm tag!"
210-
echo "⚠️ This will publish as 'latest' and could overwrite your production release."
211-
echo "⚠️ Consider canceling and re-running with a custom npm tag like 'beta' or 'dev'."
212-
echo "⚠️ Waiting 10 seconds before proceeding..."
213-
sleep 10
203+
echo "⚠️ WARNING: Publishing from non-standard branch '$BRANCH_NAME' without a custom npm tag"
204+
echo "⚠️ This will publish as 'latest' and may overwrite your production release"
214205
fi
215206
echo "Branch $BRANCH_NAME doesn't match expected patterns, using default publishing"
216207
fi

0 commit comments

Comments
 (0)