addAsset function
Uploads the file at assetPath
to git hub against the given release.
If mimeType
is not supplied then the extension of the assetPath
is
used to determine the mimeType
.
Implementation
void addAsset(SimpleGitHub ghr, ghub.Release release,
{required String assetPath, String? mimeType}) {
mimeType ??= lookupMimeType(assetPath);
print('Sending Asset $assetPath mimeType: $mimeType');
ghr.attachAssetFromFile(
release: release,
assetPath: assetPath,
assetName: basename(assetPath),
mimeType: mimeType!,
);
}