Skip to content

Commit 9a8a65b

Browse files
[FSSDK-11956] manual workflow update
1 parent f5f1e25 commit 9a8a65b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/csharp_release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,28 @@
33
on:
44
release:
55
types: [ published ] # Trigger on published pre-releases and releases
6-
workflow_dispatch:
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'Tag to build (e.g., v4.2.0)'
10+
required: true
11+
type: string
712

813
jobs:
914
variables:
1015
name: Set Variables
1116
runs-on: ubuntu-latest
1217
env:
13-
TAG: ${{ github.event.release.tag_name }}
18+
TAG: ${{ github.event.release.tag_name || inputs.tag }}
1419
steps:
1520
- name: Extract semantic version from tag
1621
id: set_version
1722
run: |
23+
if [ -z "${TAG}" ]; then
24+
echo "Error: No release tag available. Please provide a tag when manually triggering the workflow."
25+
exit 1
26+
fi
27+
echo "Processing tag: ${TAG}"
1828
# Remove the "v" prefix if it exists and extract the semantic version number
1929
SEMANTIC_VERSION=$(echo "${TAG}" | grep -Po "(?<=^|[^0-9])([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-[a-zA-Z]+[0-9]*)?)")
2030
SEMANTIC_VERSION=${SEMANTIC_VERSION#"v"}

0 commit comments

Comments
 (0)