1 parent 064470c commit ed018b2Copy full SHA for ed018b2
1 file changed
.github/workflows/publish_nuget.yml
@@ -32,6 +32,17 @@ jobs:
32
runs-on: ubuntu-latest
33
34
steps:
35
+ # validate the input.version as Github do not yet support regex validation
36
+ - name: Validate version input
37
+ run: |
38
+ REGEXP="^[1-9]{1,2}.[0-9]+.[0-9]+(-beta\d+)?$"
39
+ if [[ ! "$UNTRUSTED_INPUT" =~ $REGEXP ]]; then
40
+ echo "::error:: Invalid version format"
41
+ exit 1
42
+ fi
43
+ env:
44
+ UNTRUSTED_INPUT: ${{ github.event.inputs.version }}
45
+
46
- uses: actions/checkout@v6
47
48
# Only validate tag is on master for auto-triggered runs
0 commit comments