mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-06-28 06:16:01 +00:00
chore: replace mime
with mime-types
(#624)
Some checks are pending
main / build (push) Waiting to run
Some checks are pending
main / build (push) Waiting to run
Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
parent
86463358d8
commit
8836085300
4 changed files with 42 additions and 20 deletions
|
@ -2,7 +2,7 @@ import { GitHub } from "@actions/github/lib/utils";
|
|||
import { Config, isTag, releaseBody, alignAssetName } from "./util";
|
||||
import { statSync } from "fs";
|
||||
import { open } from "fs/promises";
|
||||
import { getType } from "mime";
|
||||
import { lookup } from "mime-types";
|
||||
import { basename } from "path";
|
||||
|
||||
type GitHub = InstanceType<typeof GitHub>;
|
||||
|
@ -149,7 +149,7 @@ export const asset = (path: string): ReleaseAsset => {
|
|||
};
|
||||
|
||||
export const mimeOrDefault = (path: string): string => {
|
||||
return getType(path) || "application/octet-stream";
|
||||
return lookup(path) || "application/octet-stream";
|
||||
};
|
||||
|
||||
export const upload = async (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue