build: fix changelog generation

This commit is contained in:
Michael Kriese 2024-09-25 10:49:06 +02:00
parent 215eba92ba
commit 92eed05b4e
No known key found for this signature in database
GPG key ID: F8D7748549A5986A
3 changed files with 5 additions and 2 deletions

View file

@ -167,6 +167,9 @@ jobs:
fetch-depth: 0 # Important for changelog fetch-depth: 0 # Important for changelog
filter: blob:none # We don't need all blobs filter: blob:none # We don't need all blobs
# required for proper changelogs
- run: git checkout -b "release/${GITHUB_REF_NAME#v}"
- uses: ./.forgejo/actions/setup - uses: ./.forgejo/actions/setup
- uses: ./.forgejo/actions/setup-node - uses: ./.forgejo/actions/setup-node

View file

@ -5,4 +5,4 @@ const file = process.argv[3]
? fs.createWriteStream(process.argv[3]) ? fs.createWriteStream(process.argv[3])
: process.stdout; : process.stdout;
getChangelog().pipe(file); getChangelog(process.argv[2], !!process.argv[2]).pipe(file);

View file

@ -68,7 +68,7 @@ class GiteaReleaseCommand extends Command {
return 1; return 1;
} }
const stream = getChangelog(undefined, false).setEncoding('utf8'); const stream = getChangelog(tag, true).setEncoding('utf8');
const changes = (await stream.toArray()).join(''); const changes = (await stream.toArray()).join('');
this.context.stdout.write(`Creating release ${tag}.\n`); this.context.stdout.write(`Creating release ${tag}.\n`);