remove debugging artifacts

This commit is contained in:
softprops 2021-08-08 00:24:22 -04:00
parent 6afa5259e8
commit 974961a5f7
3 changed files with 3 additions and 13152 deletions

13149
dist/index.js vendored

File diff suppressed because one or more lines are too long

View file

@ -5,7 +5,7 @@
"description": "GitHub Action for creating GitHub Releases", "description": "GitHub Action for creating GitHub Releases",
"main": "lib/main.js", "main": "lib/main.js",
"scripts": { "scripts": {
"build": "ncc build src/main.ts", "build": "ncc build src/main.ts --minify",
"test": "jest", "test": "jest",
"fmt": "prettier --write \"src/**/*.ts\" \"__tests__/**/*.ts\"", "fmt": "prettier --write \"src/**/*.ts\" \"__tests__/**/*.ts\"",
"fmtcheck": "prettier --check \"src/**/*.ts\" \"__tests__/**/*.ts\"" "fmtcheck": "prettier --check \"src/**/*.ts\" \"__tests__/**/*.ts\""

View file

@ -141,7 +141,7 @@ export const upload = async (
({ name: currentName }) => currentName == name ({ name: currentName }) => currentName == name
); );
if (currentAsset) { if (currentAsset) {
console.log(`Deleting previously uploadeed asset ${name}...`); console.log(`♻️ Deleting previously uploaded asset ${name}...`);
await github.rest.repos.deleteReleaseAsset({ await github.rest.repos.deleteReleaseAsset({
asset_id: currentAsset.id || 1, asset_id: currentAsset.id || 1,
owner, owner,
@ -151,7 +151,6 @@ export const upload = async (
console.log(`⬆️ Uploading ${name}...`); console.log(`⬆️ Uploading ${name}...`);
const endpoint = new URL(url); const endpoint = new URL(url);
endpoint.searchParams.append("name", name); endpoint.searchParams.append("name", name);
console.log(`url`, endpoint);
const resp = await fetch(endpoint, { const resp = await fetch(endpoint, {
headers: { headers: {
"content-length": `${size}`, "content-length": `${size}`,
@ -162,7 +161,6 @@ export const upload = async (
body body
}); });
const json = await resp.json(); const json = await resp.json();
console.log(`body`, json);
if (resp.status !== 201) { if (resp.status !== 201) {
throw new Error( 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.errors}"