mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-09-09 19:25:36 +08:00
chore: replace mime
with mime-types
(#624)
Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
@@ -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 (
|
||||
|
Reference in New Issue
Block a user