Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
- main
paths:
- 'package.json'
workflow_dispatch:
inputs:
skip_version_check:
description: 'Skip version change check (publish current version)'
required: false
type: boolean
default: false

concurrency:
group: publish-release
Expand Down Expand Up @@ -59,6 +66,17 @@ jobs:
# Get current version from package.json
CURRENT_VERSION=$(node -p "require('./package.json').version")

# Handle manual workflow dispatch
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
if [ "${{ inputs.skip_version_check }}" == "true" ]; then
echo "πŸ”§ Manual trigger with skip_version_check enabled"
echo "βœ… Publishing current version: $CURRENT_VERSION"
echo "changed=true" >> $GITHUB_OUTPUT
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
exit 0
fi
fi

# Get previous version from git history
git show HEAD~1:package.json > /tmp/prev-package.json 2>/dev/null || {
echo "First commit or package.json didn't exist before"
Expand Down
Loading