Skip to content

Commit 2221f1a

Browse files
fix: multi-lines for the Release notes CI
1 parent c11cc85 commit 2221f1a

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/nightly-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,11 @@
217217
continue-on-error: true
218218
run: |
219219
RELEASE_NOTES=$(node utils/scripts/generate-release-notes.js ${{ github.repository_owner }} Acode ${{ github.sha }} --format md --from-tag ${{ env.TAG_COMMIT }} --important-only --quiet --changelog-only)
220-
echo "RELEASE_NOTES=$RELEASE_NOTES" >> $GITHUB_ENV
220+
{
221+
echo "RELEASE_NOTES<<EOF"
222+
echo "$RELEASE_NOTES"
223+
echo "EOF"
224+
} >> $GITHUB_ENV
221225
- name: Release Nightly Version
222226
# Only run this step, if not called from another workflow. And a previous step is successful with releasedRequired=true
223227
id: release

utils/scripts/generate-release-notes.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ const args = process.argv.slice(2);
2727

2828
function getArgValue(flag) {
2929
const idx = args.indexOf(flag);
30-
return idx !== -1 && !args[idx + 1].startsWith("-") ? args[idx + 1] : null;
30+
return idx !== -1 && args[idx + 1] && !args[idx + 1].startsWith("-") ? args[idx + 1] : null;
3131
}
32-
3332
if (args.includes("--help") || args.length < 3) {
3433
console.log(`
3534
Usage: GITHUB_TOKEN=<token> node generate-release-notes.js <owner> <repo> <tag> [options]
@@ -41,8 +40,10 @@ Options:
4140
--merge-only Include only merge commits
4241
--help Show this help message
4342
--format [md/json] Output Format
44-
--fromTag v1.11.0 The From/Previous Tag
43+
--from-tag v1.11.0 The From/Previous Tag
4544
--quiet Suppress output to stdout
45+
--stdout-only Output to stdout only
46+
--changelog-only Output changelog only
4647
`);
4748
process.exit(0);
4849
}

0 commit comments

Comments
 (0)