Compare commits

..

10 Commits

Author SHA1 Message Date
e6268c631a error is of unknown structure 2021-08-09 09:19:25 -04:00
8988630456 error is of unknown structure 2021-08-09 00:20:24 -04:00
c1b107442c error is of unknown structure 2021-08-09 00:18:15 -04:00
4c8c431191 error is of unknown structure 2021-08-09 00:16:19 -04:00
1505034bb0 error is of unknown structure 2021-08-09 00:14:58 -04:00
21e9098c3b more error info 2021-08-09 00:12:44 -04:00
26941a6e6b debug cross repo 2021-08-09 00:05:07 -04:00
487fcd9442 bump version 2021-08-08 12:15:54 -04:00
8b7a7c0162 stringify errors object 2021-08-08 12:12:34 -04:00
6c87482fb9 fix upload err fmt 2021-08-08 12:10:40 -04:00
4 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,7 @@
## 0.1.10
- fixed error message formatting for file uploads
## 0.1.9
- add support for linking release to GitHub discussion [#136](https://github.com/softprops/action-gh-release/pull/136)

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "action-gh-release",
"version": "0.1.9",
"version": "0.1.10",
"private": true,
"description": "GitHub Action for creating GitHub Releases",
"main": "lib/main.js",

View File

@ -167,7 +167,9 @@ export const upload = async (
const json = await resp.json();
if (resp.status !== 201) {
throw new Error(
"Failed to upload release asset ${name}. recieved status code ${resp.status}\n${json.message}\n${json.errors}"
`Failed to upload release asset ${name}. recieved status code ${
resp.status
}\n${json.message}\n${JSON.stringify(json.errors)}`
);
}
return json;
@ -269,7 +271,7 @@ export const release = async (
commitMessage = ` using commit "${target_commitish}"`;
}
console.log(
`👩‍🏭 Creating new GitHub release for tag ${tag_name}${commitMessage}...`
`👩‍🏭 Creating new GitHub release in ${owner}/${repo} for tag ${tag_name}${commitMessage}...`
);
try {
let release = await releaser.createRelease({
@ -289,7 +291,9 @@ export const release = async (
console.log(
`⚠️ GitHub release failed with status: ${
error.status
}, retrying... (${maxRetries - 1} retries remaining)`
}\n${JSON.stringify(
error.response.data.errors
)}\nretrying... (${maxRetries - 1} retries remaining)`
);
return release(config, releaser, maxRetries - 1);
}