File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,11 @@ jobs:
74
74
if [ "${VERSION_SPEC}" != "[" ]; then
75
75
VERSION_SPEC+=","
76
76
fi
77
- VERSION_SPEC+="{\"selector\":\"$SELECTOR\""
78
-
79
- if [ "$SELECTOR" == "latest" ]; then
80
- VERSION_SPEC+=",\"tag\":\"$(curl -s https://api.github.com/repos/vercel/next.js/releases/latest | jq -r .tag_name)\""
81
- elif [ "$SELECTOR" == "canary" ]; then
82
- VERSION_SPEC+=",\"tag\":\"$(curl -s https://api.github.com/repos/vercel/next.js/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | head -n 1)\""
83
- else
84
- VERSION_SPEC+=",\"tag\":\"v$SELECTOR\""
85
- fi
86
77
87
- VERSION_SPEC+=",\"version\":\"$(npm view next@$SELECTOR version)\""
78
+ VERSION=$(npm view next@$SELECTOR version)
79
+ TAG="v$VERSION"
88
80
89
- VERSION_SPEC+="}"
81
+ VERSION_SPEC+="{\"selector\":\"$SELECTOR\",\"tag\":\"$TAG\",\"version\":\"$VERSION\" }"
90
82
done
91
83
VERSION_SPEC+="]"
92
84
echo "version_spec=$VERSION_SPEC" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments