6b863fe294
Follow-up to https://github.com/vercel/next.js/pull/32337 this removes the un-necessary step where we fetch all of the tags which requires pulling a lot of un-necessary git history inflating cache size and publish times. The only reason these tags were needing to be fetched is due to an issue in how the `actions/checkout` step works (https://github.com/actions/checkout/issues/882). This reduces the publish times by at least 4 minutes by removing the tags fetching step https://github.com/vercel/next.js/actions/runs/3598569786/jobs/6061449995#step:16:14 As a further optimization this adds concurrency to the `npm publish` calls themselves to hopefully reduce time spent there as well.
18 lines
415 B
Bash
Executable file
18 lines
415 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ $(node ./scripts/check-is-release.js 2> /dev/null || :) = v* ]];
|
|
then
|
|
echo "Publish occurred, running release stats..."
|
|
else
|
|
echo "Not publish commit, exiting..."
|
|
touch .github/actions/next-stats-action/SKIP_NEXT_STATS.txt
|
|
exit 0;
|
|
fi
|
|
|
|
if [[ -z "$NPM_TOKEN" ]];then
|
|
echo "No NPM_TOKEN, exiting.."
|
|
exit 0;
|
|
fi
|
|
|
|
echo "Waiting 30 seconds to allow publish to finalize"
|
|
sleep 30
|