Skip to content

Commit

Permalink
feat: Append a blank line after the changelog output, so it can be pr…
Browse files Browse the repository at this point in the history
…epending before existing content
  • Loading branch information
kevinrenskers committed Feb 19, 2021
1 parent a2dd850 commit 4434a68
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ jobs:
if: ${{ !env.ACT }}
with:
path: ./CHANGELOG.md
contents: |
echo ${{ steps.changelog.outputs.changelog }}\n\n${{ steps.package.outputs.content }}
contents: ${{ steps.changelog.outputs.changelog }}${{ steps.package.outputs.content }}
write-mode: overwrite

- name: Commit and push CHANGELOG.md
Expand Down
9 changes: 1 addition & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
echo # 0.0.9 - 2021-02-19

## Documentation Changes
- Update CHANGELOG.md

## Other Changes
- Test a second one, see if it's properly prepended
\n\n# 0.0.8 - 2021-02-19
# 0.0.8 - 2021-02-19

## Documentation Changes
- Improved README
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5045,7 +5045,7 @@ async function run() {
});

const now = new Date();
const changelog = `# ${tags[0].name} - ${now.toISOString().substr(0, 10)}\n` + changes;
const changelog = `# ${tags[0].name} - ${now.toISOString().substr(0, 10)}\n` + changes + "\n\n";

Object(_actions_core__WEBPACK_IMPORTED_MODULE_1__.info)(changelog);
Object(_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput)("changelog", changelog);
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function run() {
});

const now = new Date();
const changelog = `# ${tags[0].name} - ${now.toISOString().substr(0, 10)}\n` + changes;
const changelog = `# ${tags[0].name} - ${now.toISOString().substr(0, 10)}\n` + changes + "\n\n";

info(changelog);
setOutput("changelog", changelog);
Expand Down

0 comments on commit 4434a68

Please sign in to comment.