Skip to content

Commit dff9c33

Browse files
authored
ci: don't use next's github releases as source of most recent stable/canary versions (#2686)
1 parent eea9520 commit dff9c33

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

.github/workflows/test-e2e.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,11 @@ jobs:
7474
if [ "${VERSION_SPEC}" != "[" ]; then
7575
VERSION_SPEC+=","
7676
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
8677
87-
VERSION_SPEC+=",\"version\":\"$(npm view next@$SELECTOR version)\""
78+
VERSION=$(npm view next@$SELECTOR version)
79+
TAG="v$VERSION"
8880
89-
VERSION_SPEC+="}"
81+
VERSION_SPEC+="{\"selector\":\"$SELECTOR\",\"tag\":\"$TAG\",\"version\":\"$VERSION\"}"
9082
done
9183
VERSION_SPEC+="]"
9284
echo "version_spec=$VERSION_SPEC" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)