Skip to content

Commit 5dde1e5

Browse files
committed
keep generated ReleaseNotes.md file in tmp path
1 parent be64d8b commit 5dde1e5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/tag-release.nu

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export def find-repo-name [] {
129129
}
130130
}
131131

132-
const RELEASE_NOTES = ".github/ReleaseNotes.md"
132+
const RELEASE_NOTES = "ReleaseNotes.md"
133133
const CHANGELOG = "CHANGELOG.md"
134134

135135
# Use git-cliff to generate list of changes.
@@ -147,8 +147,9 @@ def gen-changes [
147147
]
148148
} else {
149149
print "\nGenerating Release Notes"
150+
let output = $nu.config-path | path dirname | path join $RELEASE_NOTES
150151
$args = $args | append [
151-
--output $RELEASE_NOTES
152+
--output ($nu.temp-path | path join $RELEASE_NOTES)
152153
--unreleased
153154
--strip header
154155
]
@@ -218,7 +219,6 @@ def main [
218219
print $"The new version will be ($ver)"
219220

220221
gen-changes $ver $first_commit $gh_repo --full
221-
gen-changes $ver $first_commit $gh_repo
222222

223223
if not (is-on-main) {
224224
print $"(ansi yellow)The default branch is not checked out; (ansi red)aborting(ansi reset)"
@@ -238,6 +238,7 @@ def main [
238238
# HEAD is now moved
239239
}
240240

241+
gen-changes $ver $first_commit $gh_repo
241242
# push the new tag (pointing at HEAD) by creating a GitHub release
242243
print $"Deploying ($ver)"
243244
run-cmd ...[
@@ -248,7 +249,7 @@ def main [
248249
--title
249250
$ver
250251
--notes-file
251-
$RELEASE_NOTES
252+
($nu.temp-path | path join $RELEASE_NOTES)
252253
--repo
253254
$gh_repo
254255
]

0 commit comments

Comments
 (0)