Skip to content

Commit 6345f59

Browse files
committed
Make release workflow manually triggerable
1 parent 63b998f commit 6345f59

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Release
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
force_release:
7+
description: 'Run release even if version did not change'
8+
type: boolean
9+
required: false
10+
default: false
411
push:
512
branches:
613
- main
@@ -23,6 +30,8 @@ jobs:
2330

2431
- name: Check if version changed
2532
id: check
33+
env:
34+
FORCE_RELEASE: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.force_release == 'true' }}
2635
run: |
2736
# Get the current version
2837
CURRENT_VERSION=$(grep -oP 'project\(xrDriver VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
@@ -38,6 +47,12 @@ jobs:
3847
PREVIOUS_VERSION="none"
3948
fi
4049
echo "Previous version: ${PREVIOUS_VERSION}"
50+
51+
if [ "${FORCE_RELEASE}" = "true" ]; then
52+
echo "Force release enabled; proceeding regardless of version change"
53+
echo "changed=true" >> $GITHUB_OUTPUT
54+
exit 0
55+
fi
4156
4257
if [ "${CURRENT_VERSION}" != "${PREVIOUS_VERSION}" ]; then
4358
echo "Version changed from ${PREVIOUS_VERSION} to ${CURRENT_VERSION}"

0 commit comments

Comments
 (0)