mirror of https://github.com/mifi/lossless-cut
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
567 B
TypeScript
25 lines
567 B
TypeScript
import { DefaultArtifactClient } from '@actions/artifact';
|
|
import assert from 'node:assert';
|
|
import { basename } from 'node:path';
|
|
import yargs from 'yargs';
|
|
import { hideBin } from 'yargs/helpers';
|
|
|
|
|
|
const args = yargs(hideBin(process.argv))
|
|
.option('name', {
|
|
type: 'string',
|
|
})
|
|
.parseSync();
|
|
|
|
assert(args._.length > 0, 'Please provide one or more files');
|
|
|
|
const client = new DefaultArtifactClient();
|
|
|
|
const name = args.name ?? basename(String(args._[0]));
|
|
|
|
await client.uploadArtifact(
|
|
name,
|
|
args._.map(String),
|
|
process.cwd(), // root directory
|
|
);
|