From 4df10cfc6d5c73eca390374b9123881c30e21e8d Mon Sep 17 00:00:00 2001 From: Nipuna Perera Date: Fri, 31 Oct 2025 16:41:57 +0000 Subject: [PATCH] feat: add manual trigger to publish-release workflow - Add workflow_dispatch trigger with skip_version_check input - Allow manual publishing of current version without version change check - Skip version validation when manually triggered with skip_version_check=true - Enables publishing version 1.0.2 to marketplace on demand --- .github/workflows/publish-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 5a539b4..6872687 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -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 @@ -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"