Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
fix: encode file content with base64 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
boywithkeyboard authored Jun 10, 2023
1 parent 7ae8e0d commit 565dce0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions action.js
Original file line number Diff line number Diff line change
Expand Up @@ -7849,11 +7849,11 @@ async function action() {
await rest.repos.createOrUpdateFileContents({
...import_github.context.repo,
path: "changelog.md",
content: `${changelogBody}${content === "" ? "\n" : `
content: Buffer.from(`${changelogBody}${content === "" ? "\n" : `

${content}`}`,
${content}`}`).toString("base64"),
message: (0, import_core.getInput)("commit_message").replace("{tag}", tag),
sha
...sha !== null && { sha }
});
(0, import_core.setOutput)("release_id", release.id);
(0, import_core.setOutput)("tag_name", tag);
Expand Down
4 changes: 2 additions & 2 deletions action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ async function action() {
await rest.repos.createOrUpdateFileContents({
...context.repo,
path: 'changelog.md',
content: `${changelogBody}${content === '' ? '\n' : `\n\n${content}`}`,
content: Buffer.from(`${changelogBody}${content === '' ? '\n' : `\n\n${content}`}`).toString('base64'),
message: getInput('commit_message').replace('{tag}', tag),
sha
...(sha !== null && { sha })
})

setOutput('release_id', release.id)
Expand Down

0 comments on commit 565dce0

Please sign in to comment.