mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-10 02:44:19 +00:00
address asset upload warning (#134)
* bump version * address asset upload warning * refactor to new octokit api, work around release asset upload api * format upload url * unminify to debug * try alt constructor * utilize formatted upload url * authorize upload * pass token explicitly * address conflicting uploads * remove debugging artifacts
This commit is contained in:
parent
59c3b48916
commit
003621c2ca
8 changed files with 273 additions and 218 deletions
|
@ -15,11 +15,11 @@ describe("github", () => {
|
|||
|
||||
describe("asset", () => {
|
||||
it("derives asset info from a path", async () => {
|
||||
const { name, mime, size, file } = asset("tests/data/foo/bar.txt");
|
||||
const { name, mime, size, data } = asset("tests/data/foo/bar.txt");
|
||||
assert.equal(name, "bar.txt");
|
||||
assert.equal(mime, "text/plain");
|
||||
assert.equal(size, 10);
|
||||
assert.equal(file.toString(), "release me");
|
||||
assert.equal(data.toString(), "release me");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,11 +4,22 @@ import {
|
|||
paths,
|
||||
parseConfig,
|
||||
parseInputFiles,
|
||||
unmatchedPatterns
|
||||
unmatchedPatterns,
|
||||
uploadUrl
|
||||
} from "../src/util";
|
||||
import * as assert from "assert";
|
||||
|
||||
describe("util", () => {
|
||||
describe("uploadUrl", () => {
|
||||
it("stripts template", () => {
|
||||
assert.equal(
|
||||
uploadUrl(
|
||||
"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}"
|
||||
),
|
||||
"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets"
|
||||
);
|
||||
});
|
||||
});
|
||||
describe("parseInputFiles", () => {
|
||||
it("parses empty strings", () => {
|
||||
assert.deepStrictEqual(parseInputFiles(""), []);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue