We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 985f7da commit 948a179Copy full SHA for 948a179
action.yml
@@ -85,8 +85,8 @@ runs:
85
lower_req="$(printf '%s' "$REQUESTED_VERSION" | tr '[:upper:]' '[:lower:]')"
86
if [[ -z "$REQUESTED_VERSION" || "$lower_req" == "latest" || "$lower_req" == "null" ]]; then
87
REQUESTED_VERSION=$(
88
- curl -s https://api.github.com/repos/PowerShell/PowerShell/releases/latest \
89
- | grep -oP '"tag_name":\s*"\K([^"]+)' | sed 's/^v//'
+ curl -s https://api.github.com/repos/PowerShell/PowerShell/releases/latest |
+ grep '"tag_name"' | head -n1 | sed -E 's/.*"v?([^"]+)".*/\1/'
90
)
91
echo "Latest stable PowerShell release detected: $REQUESTED_VERSION"
92
fi
0 commit comments