You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/main.yml
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,18 @@ jobs:
10
10
name: "Build release"
11
11
runs-on: windows-latest
12
12
steps:
13
-
- id: get-ver
13
+
- name: get ver from ref_name
14
+
id: get-ver
14
15
run: |
15
-
id=$(echo ${{github.ref_name}} | cut -dv -f2)
16
-
echo "::set-output name=id::$ver"
16
+
if (("${{github.ref_name}}" -match 'v?(\d+\.\d+\.\d+)') -eq $false) { Write-Host "::error::github.ref_name not in valid format. Expected '0.0.0' or 'v0.0.0' but got '${{github.ref_name}}'." -fore RED; exit 1; }
0 commit comments