From b712dd5eb9b5d0374e81e56a4c2663a3de66c36e Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Mon, 1 Sep 2025 16:59:42 +0200 Subject: [PATCH] fix: unable to detect workflow_dispatch Signed-off-by: Ruben Romero Montes --- .github/workflows/publish-marketplace.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-marketplace.yml b/.github/workflows/publish-marketplace.yml index fbfdcb0..3bc1e99 100644 --- a/.github/workflows/publish-marketplace.yml +++ b/.github/workflows/publish-marketplace.yml @@ -36,10 +36,19 @@ jobs: - name: Determine version and channel id: version_info run: | - if [ "${{ github.event.inputs.version }}" != "" ]; then - # Manual trigger with specific inputs - VERSION="${{ github.event.inputs.version }}" - CHANNEL="${{ github.event.inputs.channel }}" + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + # Manual trigger - check if inputs are provided + if [ "${{ github.event.inputs.version }}" != "" ] && [ "${{ github.event.inputs.channel }}" != "" ]; then + # Manual trigger with specific inputs + VERSION="${{ github.event.inputs.version }}" + CHANNEL="${{ github.event.inputs.channel }}" + else + # Manual trigger without inputs - treat as nightly build + BASE_VERSION=$(grep 'projectVersion=' gradle.properties | cut -d'=' -f2) + DATE=$(date +%Y%m%d) + VERSION="${BASE_VERSION/-SNAPSHOT/-nightly.${DATE}}" + CHANNEL="nightly" + fi elif [ "${{ github.event_name }}" == "release" ]; then # Release event - publish to stable channel VERSION="${GITHUB_REF#refs/tags/}"