Skip to content

Commit 100a1d3

Browse files
authored
Update release stats workflow (vercel#17580)
Follow-up to vercel#17533 this makes sure the file used to signal release stats should be skipped for a non-release merge is created in a location that is accessible by the stats action and also updates the release action info detection for the new workflow
1 parent b42be17 commit 100a1d3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/actions/next-stats-action/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
2727

2828
;(async () => {
2929
try {
30-
if (await fs.pathExists(path.join(process.cwd(), 'SKIP_NEXT_STATS.txt'))) {
30+
if (await fs.pathExists(path.join(__dirname, '../SKIP_NEXT_STATS.txt'))) {
3131
console.log(
3232
'SKIP_NEXT_STATS.txt file present, exiting stats generation..'
3333
)

.github/actions/next-stats-action/src/prepare/action-info.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ module.exports = function actionInfo() {
5656
isLocal: LOCAL_STATS,
5757
commitId: null,
5858
issueId: ISSUE_ID,
59-
isRelease: releaseTypes.has(GITHUB_ACTION),
59+
isRelease:
60+
GITHUB_REPOSITORY === 'vercel/next.js' &&
61+
(GITHUB_REF || '').includes('canary'),
6062
}
6163

6264
// get comment

release-stats.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ git describe --exact-match
44

55
if [[ ! $? -eq 0 ]];then
66
echo "Nothing to publish, exiting.."
7-
touch SKIP_NEXT_STATS.txt
7+
touch .github/actions/next-stats-action/SKIP_NEXT_STATS.txt
88
exit 0;
99
fi
1010

0 commit comments

Comments
 (0)