-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply publish step optimizations (#43620)
Follow-up to #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 (actions/checkout#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.
- Loading branch information
Showing
5 changed files
with
150 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#!/bin/bash | ||
|
||
git describe --exact-match | ||
|
||
if [[ ! $? -eq 0 ]];then | ||
echo "Nothing to publish, exiting.." | ||
touch .github/actions/next-stats-action/SKIP_NEXT_STATS.txt | ||
exit 0; | ||
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 "Publish occurred, running release stats..." | ||
echo "Waiting 30 seconds to allow publish to finalize" | ||
sleep 30 |