Skip to content

Commit 7897426

Browse files
committed
Fix release notes preview for non PRs
1 parent 008b382 commit 7897426

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/preview_release_notes.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
python-version: ${{ env.PYTHON_VERSION }}
3333
- name: Generate Release Notes
34-
run: python -m scripts.release.release_notes -s $RELEASE_INITIAL_COMMIT_SHA -v $RELEASE_INITIAL_VERSION -o release_notes_tmp.md
34+
run: python -m scripts.release.release_notes -s $RELEASE_INITIAL_COMMIT_SHA -v $RELEASE_INITIAL_VERSION -o release_notes_preview.md
3535
env:
3636
# We can not use environments set via GitHub UI because they will
3737
# not be available in the pull requests running from forks.
@@ -40,8 +40,9 @@ jobs:
4040
- name: Add disclaimer to release notes preview for Pull Requests
4141
if: github.event_name == 'pull_request'
4242
run: |
43-
echo -e "_:warning: (this preview might not be accurate if the PR is not rebased on current master branch)_\n" > release_notes_preview.md
44-
cat release_notes_tmp.md >> release_notes_preview.md
43+
echo -e "_:warning: (this preview might not be accurate if the PR is not rebased on current master branch)_\n" > release_notes_tmp.md
44+
cat release_notes_preview.md >> release_notes_tmp.md
45+
mv -f release_notes_tmp.md release_notes_preview.md
4546
- name: Summarize results
4647
run: cat release_notes_preview.md >> $GITHUB_STEP_SUMMARY
4748
- name: Update PR comment

0 commit comments

Comments
 (0)