Skip to content

Commit 5c1efc2

Browse files
authored
fix: unable to detect workflow_dispatch (#211)
Signed-off-by: Ruben Romero Montes <[email protected]>
1 parent 69c08d2 commit 5c1efc2

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/publish-marketplace.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,19 @@ jobs:
3636
- name: Determine version and channel
3737
id: version_info
3838
run: |
39-
if [ "${{ github.event.inputs.version }}" != "" ]; then
40-
# Manual trigger with specific inputs
41-
VERSION="${{ github.event.inputs.version }}"
42-
CHANNEL="${{ github.event.inputs.channel }}"
39+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
40+
# Manual trigger - check if inputs are provided
41+
if [ "${{ github.event.inputs.version }}" != "" ] && [ "${{ github.event.inputs.channel }}" != "" ]; then
42+
# Manual trigger with specific inputs
43+
VERSION="${{ github.event.inputs.version }}"
44+
CHANNEL="${{ github.event.inputs.channel }}"
45+
else
46+
# Manual trigger without inputs - treat as nightly build
47+
BASE_VERSION=$(grep 'projectVersion=' gradle.properties | cut -d'=' -f2)
48+
DATE=$(date +%Y%m%d)
49+
VERSION="${BASE_VERSION/-SNAPSHOT/-nightly.${DATE}}"
50+
CHANNEL="nightly"
51+
fi
4352
elif [ "${{ github.event_name }}" == "release" ]; then
4453
# Release event - publish to stable channel
4554
VERSION="${GITHUB_REF#refs/tags/}"

0 commit comments

Comments
 (0)